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


相关文章
|
6月前
|
开发工具 iOS开发
解决Flutter运行报错Could not run build/ios/iphoneos/Runner.app
解决Flutter运行报错Could not run build/ios/iphoneos/Runner.app
239 2
|
9月前
|
设计模式 人工智能 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
276 1
|
8月前
|
Android开发
Android studio 出现Plugin [id: ‘com.android.application‘, version: ‘8.1.0‘, apply: false] 问题解决办法
Android studio 出现Plugin [id: ‘com.android.application‘, version: ‘8.1.0‘, apply: false] 问题解决办法
2447 1
|
Java 数据库 Android开发
在添加greendao 的plugin 出现?:Could not initialize class com.android.sdklib.repository
在添加greendao 的plugin 出现?:Could not initialize class com.android.sdklib.repository
376 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
93 0
|
IDE 开发工具
Unable to load class ‘org.gradle.api.internal.plugins.DefaultConvention‘
Unable to load class ‘org.gradle.api.internal.plugins.DefaultConvention‘
1333 0
Unable to load class 'org.gradle.api.internal.component.Usage
Unable to load class 'org.gradle.api.internal.component.Usage
141 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
134 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
1757 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.
224 0
解决Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.