Je suis confronté à ce problème avec Android studio 3.0.1.
Erreur:L'exécution a échoué pour la tâche ':app:transformClassesWithMultidexlistForAlaminDebug'. > java.io.IOException : Can't write [ E:\Study\SamarSol\Android\GiftClubCustomer\app\build\intermediates\multi -dex \alamin\debug\componentClasses.jar ] (Ne peut pas lire [ E:\Study\SamarSol\Android\GiftClubCustomer\app\build\intermediates\transforms\desugar\alamin\debug\97.jar (;;;;;;**.class)] (Duplicate zip entry [97.jar:androidx/versionedparcelable/CustomVersionedParcelable.class]))
J'ai essayé plusieurs solutions mais j'ai toujours une erreur.
Mon fichier gradle est ici :
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.perkssbazaar.member"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
manifestPlaceholders = [HOCKEYAPP_APP_ID: "d03e9318b41d4031a783d1cc2b316c81"] //hockey app
}
flavorDimensions "default"
dexOptions {
javaMaxHeapSize "4g"
}
productFlavors {
LondonDentalStudio {
defaultConfig.applicationId "com.perkssbazaar.member.LondonDentalStudio"
manifestPlaceholders = [
appIcon: "@mipmap/lds_appicon"
]
resValue "string", "app_name", "London Dental Studio"
}
alamin {
defaultConfig.applicationId "com.perkssbazaar.member.alamin"
manifestPlaceholders = [
appIcon: "@mipmap/alamin_appicon"
]
resValue "string", "app_name", "al-amin"
}
generic {
defaultConfig.applicationId "com.perkssbazaar.member"
manifestPlaceholders = [
appIcon: "@mipmap/perksslogo"
]
resValue "string", "app_name", "Perkss"
}
}
buildTypes {
debug {
productFlavors.LondonDentalStudio.buildConfigField "String", "flavor", "\"LondonDentalStudio\""
productFlavors.alamin.buildConfigField "String", "flavor", "\"alamin\""
productFlavors.generic.buildConfigField "String", "flavor", "\"generic\""
}
release {
productFlavors.LondonDentalStudio.buildConfigField "String", "flavor", "\"LondonDentalStudio\""
productFlavors.alamin.buildConfigField "String", "flavor", "\"alamin\""
productFlavors.generic.buildConfigField "String", "flavor", "\"generic\""
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
implementation 'com.android.support:support-compat:28.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:28.0.0'
compile 'com.android.support:design:28.0.0'
compile 'com.android.support:mediarouter-v7:28.0.0'
compile 'me.dm7.barcodescanner:zxing:1.9.8'
compile 'com.google.zxing:core:3.3.0'
compile 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
compile 'com.github.moondroid.coverflow:library:1.0'
compile 'com.android.support:cardview-v7:28.0.0'
compile 'com.cloudrail:cloudrail-si-android:2.6.5'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
//compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.daprlabs.aaron:swipedeck:2.0.6'
compile 'com.github.jrvansuita:PickImage:2.1.6'
compile 'com.squareup.picasso:picasso:2.5.2'
//compile 'com.google.android.gms:play-services:10.2.4'
compile 'com.google.android.gms:play-services-gcm:12.0.0'
compile 'com.android.support:multidex:1.0.3'
//compile 'com.facebook.android:facebook-android-sdk:4.12.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
//for slide image banner
compile 'com.nineoldandroids:library:2.4.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
//circular image view
//compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.12'
//gif image view
compile 'com.azoft.carousellayoutmanager:carousel:1.2.1'
/**For push Notification*/
compile 'com.microsoft.azure:notification-hubs-android-sdk:0.4@aar'
compile 'com.microsoft.azure:azure-notifications-handler:1.0.1@aar'
/**Range seek bar*/
compile 'com.appyvet:materialrangebar:1.4.1'
/**For google analytics*/
//compile 'com.google.firebase:firebase-core:10.2.4'
//compile 'com.google.android.gms:play-services-analytics:10.2.4'
/*Integration of hockey app*/
compile 'net.hockeyapp.android:HockeySDK:5.1.1'
//apply plugin: 'com.google.gms.google-services'
implementation 'com.android.support:recyclerview-v7:28.0.0'
//implementation 'com.google.code.gson:gson:2.8.5'
/* For Payment Stripe Libraries*/
implementation 'com.stripe:stripe-android:8.1.0'
implementation "com.stripe:stripe-java:7.10.0"
implementation 'com.github.extralam:Stripe-Android:1.0.2'
// glide
compile 'com.github.bumptech.glide:glide:3.7.0'
}
repositories {
maven {
url "http://dl.bintray.com/microsoftazuremobile/SDK"
}
}
** J'ai ajouté multidex
** Projet de nettoyage et reconstruction
** Vider le cache de gradle
** Supprimer le fichier .gradle
Mais j'ai toujours une erreur.