- Caused by: com.android.builder.d
- Caused by: com.android.builder.d
- Caused by: com.android.builder.d
- Tablayout报错Error inflating class
- Android 常见的Crash的产生和处理
- 解决android中出现的“android.view.Windo
- 关于在linux 下 composer 安装,更新插件出现内存异
- 亲子打卡日记Feb.28th,overcast
- Caused by: ElasticsearchStatusEx
- Caused by: ElasticsearchExceptio
今天把android studio 升级到了3.2之后发现了很多问题,暂时记录如下:
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/xxx/.gradle/caches/transforms-1/files-1.1/butterknife-runtime-9.0.0-rc2.aar/020f27787defbf924ab1f60f13609c35/jars/classes.jar

在网上也找了好半天方法,最后发现问题的解决方式很简单,只需要在 build.gradle(Module:app) 文件中添加两行代码就可以:
// 这里是需要添加代码
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
这里是我的完整代码
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.xxx.xxx"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// 这里是需要添加代码
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
问题的原因是:发现如果你的module 中使用了 Java1.8,那你必须也要添加以上代码到你的app gradle 中
网友评论