A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
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.
I get this error about 1 out of every 10 builds.
My quick fix - is within Android Studio - open the Terminal panel (typically bottom of studio). Run shell command
rm -rf build/output/apk
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
org.gradle.parallel=false
org.gradle.caching=false
org.gradle.configureondemand=false
build.gradle
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.incremental = false
}
}
A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
It finally worked!
I solved the problem by adding adding org.gradle.jvmargs=-Xmx4608m
in the gradle.properties file and deleting the./gradle/cahes directly ✔️
Related Topics
How to Detect If User First Time in Firebase
Disable Orange Outline Highlight on Focus
Cardview Layout_Width="Match_Parent" Does Not Match Parent Recyclerview Width
Android:Configchanges="Orientation" Does Not Work with Fragments
Passing String Array Between Two Class in Android Application
How to Securely Store Access Token and Secret in Android
Design Layout for Multiple Screens
Quaternion Rotation Does Not Work as Excepted
How to Create Custom UI for Android Mediacontroller
How to Programmatically Set the Background Color Gradient on a Custom Title Bar
Is Secure.Android_Id Unique for Each Device
How to Set Text in an Edittext
Phonegap/Cordova Android Development
How to Share a Sharedpreferences File Across Two Different Android Apps