changed some things of the project two days ago. After submitting, I found that the compiler always reported errors, but the packaging was ok. Error message is as follows:
ERROR: Unable to resolve the dependency for ‘: XXX @ debugProduction/compileClasspath’ : Could not resolve project: yyy.
Show Details
Affected Modules: XXX p>
where ‘XXX’ and ‘yyy’ are the two modules in my project. I looked for many ways on the Internet, but I couldn’t solve them.
later went back to the last change and found that I had changed build.gradle for module x, but not for module y, and the configuration of buildTypes for the two modules was inconsistent.
so the obvious solution is to copy the configuration of buildTypes in build.gradle of module x into build.gradle of module y.
does not have to be copied exactly, only has to be configured in the same format as the two modules . My error was caused by the buildTypes in Module X, which added the configuration of the releaseTest mode, but not in Module Y.
Read More:
- Failed to find target with hash string”android-21″ in:D:\AndroidVersionSdk
- Android project error: could not resolve com.android.support .c onstraint:constraint-layout :2.0.2.
- As Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
- Change API level Android studio
- ERROR in static/js/app.xxxxxxx.js from UglifyJs Unexpected token: operator (>)
- Failed to resolve: com.android.support:appcompat-v7:25.3.0
- Add a warehouse in allprojects repositories and report an error
- AndroidStudio sync failed solution
- ERROR: Unsupported method: AndroidProject.getVariantNames().
- ERROR Unsupported method AndroidProject.getVariantNames().
- Failed to resolve: com.github
- Android studio failed to resolve: com.github.CymChad :BaseRecyclerViewAdap terHelper:2.9.46
- android studio Error Gradle project sync failed. Please fix your project and try again
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- Solve gradle project refresh failed
- How to Fix Android Error:This Gradle plugin requires Studio 3.0 minimum
- Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK
- Idea about module is not backed by gradle
- Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process D:\….\0.jar
- Could not install Gradle distribution