执行 com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable 时发生故障 [英] A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
问题描述
我在尝试转换登录 apk 时遇到错误.在它工作之前.添加 buildTyper 后,它不起作用.谁能帮我解决这个问题?还是做错了什么?
I got the error when I trying to convert signing in apk. before it was working. after adding the buildTyper it's not working. can anyone help me with this issue? or anything did wrongly?
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "string", "google_maps_key", "AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
debuggable true
multiDexEnabled true
signingConfig signingConfigs.Able
jniDebuggable true
renderscriptDebuggable true
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "google_maps_key", "AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
推荐答案
批准的解决方案违背了拥有智能 Gradle 构建过程的目的,该过程仅编译和链接所需的代码.如果每次发生此错误时,解决方案是停止并删除构建,这将降低生产力.
The approved solution defeats the purpose of having a smart Gradle build process which compiles and links only the required code. If every time this error occurs the solution is to stop and delete the build you are killing productivity.
我大约每 10 个构建中就有 1 个出现此错误.
I get this error about 1 out of every 10 builds.
我的快速修复 - 在 Android Studio 中 - 打开终端面板(通常位于工作室底部).运行 shell 命令
My quick fix - is within Android Studio - open the Terminal panel (typically bottom of studio). Run shell command
rm -rf 构建/输出/apk
rm -rf build/output/apk
这总是有效 - 但每 10 次构建仍然是一个很大的痛苦.我在去年遇到了这个问题,所以多次更新操作系统、多次 Studio 更新等.
This always works - but still is a big pain to do every 10 builds. I have had this problem for the last year, so multiple OS updates, multiple Studio updates, etc.
希望他们能解决这个问题.我曾尝试禁用增量构建",但对这个问题没有影响.
Wish they would fix this. I have tried to disable "incremental building", but no impact on this problem.
gradle.properties
gradle.properties
org.gradle.parallel=false
org.gradle.caching=false
org.gradle.configureondemand=false
build.gradle
build.gradle
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.incremental = false
}
}
这篇关于执行 com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable 时发生故障的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!