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'
}


相关文章
|
5月前
|
设计模式 人工智能 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
73 1
|
7月前
|
缓存 IDE Go
已解决Gradle错误:“Unable to load class ‘org.gradle.api.plugins.MavenPlugin‘
已解决Gradle错误:“Unable to load class ‘org.gradle.api.plugins.MavenPlugin‘
469 0
|
11月前
Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: ERROR: APK pat
Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: ERROR: APK pat
272 0
org.gradle.api.tasks.compile.CompileOptions.setBootClasspath
org.gradle.api.tasks.compile.CompileOptions.setBootClasspath
57 0
|
IDE 开发工具
Unable to load class ‘org.gradle.api.internal.plugins.DefaultConvention‘
Unable to load class ‘org.gradle.api.internal.plugins.DefaultConvention‘
1151 0
Unable to load class 'org.gradle.api.internal.component.Usage
Unable to load class 'org.gradle.api.internal.component.Usage
87 0
|
Java 数据库 Android开发
在添加greendao 的plugin 出现?:Could not initialize class com.android.sdklib.repository
在添加greendao 的plugin 出现?:Could not initialize class com.android.sdklib.repository
257 1
在添加greendao 的plugin 出现?:Could not initialize class com.android.sdklib.repository
|
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
836 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
102 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
1539 0
Could not get unknown property ‘versions‘ for object of type com.android.build.gradle.AppExtension