gpt4 book ai didi

java - 使用 ProGuard 将字节码转换为 dex 时出错

转载 作者:太空宇宙 更新时间:2023-11-04 10:40:42 25 4
gpt4 key购买 nike

没有 multidex 出现此错误:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process

启用 multidex 后:

Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.multidex.ClassReferenceListBuilder with arguments {C:\Users\pah-to-app\app\build\intermediates\multi-dex\debug\componentClasses.jar C:\Users\pah-to-app\app\build\intermediates\transforms\proguard\debug\jars\3\1f\main.jar}

这是我的 gradle 文件:

   apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
defaultConfig {
applicationId "AAA.AAAAAAA.AAAA"
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
vectorDrawables.useSupportLibrary = true

}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'commons-io:commons-io:2.4'
compile 'com.android.volley:volley:1.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.facebook.android:facebook-login:4.30.0'
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile 'com.google.android.gms:play-services-ads:11.8.0'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
//compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:support-vector-drawable:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

期待您提出有用的建议来解决此问题。谢谢。

最佳答案

您的项目中有一些使用旧版本 google play 服务的 .jar 文件

关于java - 使用 ProGuard 将字节码转换为 dex 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49008981/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com