【发布时间】:2019-03-24 22:07:40
【问题描述】:
我的项目使用调试构建变体构建良好,但 Android Studio 会抛出发布变体:
原因:java.lang.ArrayIndexOutOfBoundsException: 213
可能是什么问题?
如果我在 build gradle 中设置 minifyEnabled false 用于发布 build 变体,那么它正在构建中,但它并不好
更新
我尝试添加到proguard-rules.pro -keepnames class com.google.android.gms.** {*;}
它可以构建,但我不喜欢这个解决方案,我不想保留 com.google.android.gms 的所有内容...
有什么好的解决办法吗?
附言我使用 classpath 'com.google.gms:google-services:4.2.0' 它根 build.gradle 作为依赖项
更新 2
现在开始抛出Execution failed for task ':app:transformClassesWithDexBuilderForRelease'.
当然使用了 Multi Dex 库(我的目标是 Android API 14+)
【问题讨论】:
标签: android android-studio android-gradle-plugin build.gradle