Je migre vers Android studio 3.0. Donc, le projet devient incapable de compiler un module nommé ":animator" et il m'affiche cette erreur :
Error:Unable to resolve dependency for
':app@dexOptions/compileClasspath': Could not resolve project
:animators. <a
href="openFile:/home/mobilepowered/MobilePowered/MyInnovalee/trunk17-10-2017/app/build.gradle">Open
File</a><br><a href="Unable to resolve dependency for
':app@dexOptions/compileClasspath': Could not resolve project
:animators.">Show Details</a>
et montrer les détails donne ce journal :
Unable to resolve dependency for ':app@dexOptions/compileClasspath':
Could not resolve project :animators.
Could not resolve project :animators. Required by:
project :app
Unable to find a matching configuration of project :animators:
- Configuration 'debugApiElements':
- Required com.android.build.api.attributes.BuildTypeAttr 'dexOptions' and found incompatible value 'debug'.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and
found compatible value 'Aar'.
- Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but
wasn't required.
- Required org.gradle.api.attributes.Usage 'java-api' and found compatible value 'java-api'.
- Configuration 'debugRuntimeElements':
- Required com.android.build.api.attributes.BuildTypeAttr 'dexOptions' and found incompatible value 'debug'.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and
found compatible value 'Aar'.
- Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but
wasn't required.
- Required org.gradle.api.attributes.Usage 'java-api' and found incompatible value 'java-runtime'.
- Configuration 'releaseApiElements':
- Required com.android.build.api.attributes.BuildTypeAttr 'dexOptions' and found incompatible value 'release'.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and
found compatible value 'Aar'.
- Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but
wasn't required.
- Required org.gradle.api.attributes.Usage 'java-api' and found compatible value 'java-api'.
- Configuration 'releaseRuntimeElements':
- Required com.android.build.api.attributes.BuildTypeAttr 'dexOptions' and found incompatible value 'release'.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and
found compatible value 'Aar'.
- Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but
wasn't required.
- Required org.gradle.api.attributes.Usage 'java-api' and found incompatible value 'java-runtime'.
0 votes
Qu'avez-vous fait ?
0 votes
Comme première et temporaire solution pour faire fonctionner le projet avec Android studio 3.0 , je maintiens distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip , compileSdkVersion 25 y buildToolsVersion "25.0.3" (en anglais) y classpath 'com.Android.tools.build:gradle:2.3.3' (chemin de classe)
0 votes
@ImeneNoomene, la réponse de JackHuang devrait être la réponse choisie. Elle est basée sur la documentation officielle, et ce que Sackurise dit n'est pas toujours faisable (pensez aux projets React Native où la plupart de vos modules proviennent du Web).
0 votes
Je rencontre ce problème à cause de la bibliothèque multi-favoris. Résolu depuis : stackoverflow.com/a/48718124/1099884
0 votes
J'ai résolu mon problème en mettant simplement à jour
Android Studio