以下错误可能是 buildToolsVersion 太高了额:
Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’.
com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ’
H:\Program Files\Java\jdk1.7.0_67\bin\java.exe” finished with non-zero exit value 1
以下错误可能是 jar包冲突:
finished with non-zero exit value 2
以下错误可能是 在多线程里notify ListView的adapter 解决方法,建临时变量存储数据:
The content of the adapter has changed but ListView did not receive a notification
可能是jia包冲突
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lbutterknife/BindBool;
Error:Execution failed for task ‘:app:transformClassesWithDexForDebug’.
Error:Execution failed for task ‘:app:transformResourcesWithMergeJavaResForDebug’.
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
File1: H:\Users\luqinmao.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.jaxrs\jackson-jaxrs-base\2.7.3\368bc79b04c0229cac5071ab7db0a0f58bb04a94\jackson-jaxrs-base-2.7.3.jar
File2: H:\Users\luqinmao.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-jaxb-annotations
解决:
添加 packagingOptions {
exclude ‘META-INF/DEPENDENCIES.txt’
exclude ‘META-INF/LICENSE.txt’
exclude ‘META-INF/NOTICE.txt’
exclude ‘META-INF/NOTICE’
exclude ‘META-INF/LICENSE’
exclude ‘META-INF/DEPENDENCIES’
exclude ‘META-INF/notice.txt’
exclude ‘META-INF/license.txt’
exclude ‘META-INF/dependencies.txt’
exclude ‘META-INF/LGPL2.1’
}
以下报错是可能因为添加了为 null 的Fragment。
java.lang.NullPointerException E/AndroidRuntime(27395): at android.app.BackStackRecord.run(BackSt