Failed to transform artifact 'butterknife-runtime.aar (com.jakewharton:butterknife-runtime:10.1.0)'

简介: Failed to transform artifact 'butterknife-runtime.aar (com.jakewharton:butterknife-runtime:10.1.0)'

保错信息如下


Execution failed for task ':app:mergeExtDexDebug'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform artifact 'butterknife-runtime.aar (com.jakewharton:butterknife-runtime:10.1.0)' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=15}
Execution failed for DexingTransform: C:\Users\Lv_345.gradle\caches\transforms-2\files-2.1\8e0adaeeb74965e53b877012710dd195\jars\classes.jar.
Error while dexing.


解决:给所有的 Module 加入jdk1.8


在 build.gradle 的 android 下加入下面代码 即可解决


compileOptions {
    sourceCompatibility = '1.8'
    targetCompatibility = '1.8'
}


相关文章
|
7月前
|
设计模式 人工智能 Java
Error: JavaFX runtime components are missing, and are required to run this application with Gradle e
Error: JavaFX runtime components are missing, and are required to run this application with Gradle e
258 1
|
Java 数据库 Android开发
在添加greendao 的plugin 出现?:Could not initialize class com.android.sdklib.repository
在添加greendao 的plugin 出现?:Could not initialize class com.android.sdklib.repository
351 1
在添加greendao 的plugin 出现?:Could not initialize class com.android.sdklib.repository
org.gradle.api.tasks.compile.CompileOptions.setBootClasspath
org.gradle.api.tasks.compile.CompileOptions.setBootClasspath
85 0
|
IDE 开发工具
Unable to load class ‘org.gradle.api.internal.plugins.DefaultConvention‘
Unable to load class ‘org.gradle.api.internal.plugins.DefaultConvention‘
1319 0
Unable to load class 'org.gradle.api.internal.component.Usage
Unable to load class 'org.gradle.api.internal.component.Usage
128 0
|
IDE Java 开发工具
IDE gradle 同步报错 IDE gradle 同步报错 Unable to find method ''org.gradle.api.tasks.TaskInputs org.gradle.api.tasks.TaskInputs.file
IDE gradle 同步报错 IDE gradle 同步报错 Unable to find method ''org.gradle.api.tasks.TaskInputs org.gradle.api.tasks.TaskInputs.file
1033 0
|
Android开发
Gradle sync failed: Cause: com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List
Gradle sync failed: Cause: com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List
132 0
Gradle sync failed: Cause: com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List
|
开发工具
Could not get unknown property ‘versions‘ for object of type com.android.build.gradle.AppExtension
Could not get unknown property ‘versions‘ for object of type com.android.build.gradle.AppExtension
1745 0
Could not get unknown property ‘versions‘ for object of type com.android.build.gradle.AppExtension
|
开发工具 Android开发
解决Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
解决Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
217 0
解决Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
Module build failed: ReferenceError: Unknown plugin “import” specified in “base” at 0 Ask Question
https://stackoverflow.com/questions/42731610/module-build-failed-referenceerror-unknown-plugin-import-specified-in-base ...
4007 0