1, App:transformclasseswithjarmergingfordebug '.
Error:execution failed for task ': App:transformclasseswithjarmergingfordebug '. > com.android.build.transform.api.TransformException:java.util.zip.ZipException:duplicate entry: > Android/support/v7/cardview/buildconfig. class
Workaround:
1. Enter in Terminal:./gradlew clean
2. Select from the menu: Build , clean Project
2, Error:unable to resolve dependency for ': [e-mail Protected]/compileclasspath ': Could not download Junit.jar (junit:junit : 4.12)
<a href= "Openfile:/users/shenjiaqi/documents/sjq/annotation/app/build.gradle" >Open File</a><br ><a href= "Unable to resolve dependency for & #39;: [e-mail protected]/compileclasspath& #39;: Could not Download Junit.jar (junit:junit:4.12) ">show details</a>
Workaround: Make sure that the following statement is included in the app's Build.gradle:
repositories { Google () jcenter () ' https://jitpark.io/'}}
The full version is as follows:
Apply plugin: ' Com.android.application 'Android {compilesdkversion27buildtoolsversion' 26.0.2 'Defaultconfig {ApplicationID"Com.sjq.recycletest"minsdkversion15targetsdkversion27Versioncode1Versionname"1.0"Testinstrumentationrunner"Android.support.test.runner.AndroidJUnitRunner"} buildtypes {release {minifyenabledfalseproguardfiles Getdefaultproguardfile (' Proguard-android.txt '), ' Proguard-rules.pro '}} repositories {Google () Jcenter ()} sourcesets {main {Manife St.srcfile' Src/main/androidmanifest.xml 'Java.srcdirs= [' Src/main/java ', ' src/main/aidl '] Resources.srcdirs= [' Src/main/java ', ' src/main/aidl '] Aidl.srcdirs= [' Src/main/aidl '] Res.srcdirs= [' Src/main/res '] Assets.srcdirs= [' Src/main/assets ']}}}dependencies {compile filetree (include: [' *.jar '], dir: ' Libs ') Androidtestcompile (' com.android.support.test.espresso:espresso-core:2.2.2 ', {Exclude group:' Com.android.support ', module: ' Support-annotations '}) Implementation' com.android.support:appcompat-v7:27.1.1 'Implementation' com.android.support:recyclerview-v7:27.1.1 'testimplementation' junit:junit:4.12 '}
3, the comment error annotation processors must is explicitly declared now.
Workaround:
In the build of the app
Android { ... Defaultconfig { ... // Add the following configuration to be OK javacompileoptions {annotationprocessoroptions {Includecompileclasspath = True }} } ...}
Problem record for Android Studio compilation