The lib_main split has been defined several times

The lib_main split has been defined several times

In "com.android.tools.build:gradle:2.0.0-alpha3" build success, But the errors that occur in "com.android.tools.build: gradle: 2.0.0-alpha5".

console error




finally get started! com.android.tools.build: gradle: 2.0.0-alpha8 and gradle.properties "org.gradle.jvmargs = -Xmx8g" it was decided to change.

+42
android android-studio
Jan 15 '16 at 2:39 on
source share
4 answers

For those who are wondering what InstantRun is (the first setting in the picture): enter image description here

And yes, disabling this option fixes the problem.

Edit 01/19/16

'com.android.tools.build: gradle: 2.0.0-alpha6' was released three days ago. Using this new version, β€œSplit lib_main was detected several times”, the error disappeared and the installation of the application completed successfully, but now I get a runtime error:

java.lang.RuntimeException: Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path: DexPathList[[zip file "/data/app/com.onegravity.k10.pro2-2/base.apk", zip file "/data/app/com.onegravity.k10.pro2-/split_lib_main.apk"] Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path: DexPathList[[zip file "/data/app/com.onegravity.k10.pro2-2/base.apk", zip file "/data/app/com.onegravity.k10.pro2-2/split_lib_main.apk"] Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.onegravity.k10.pro2-2/base.apk Suppressed: java.lang.ClassNotFoundException: com.android.tools.fd.runtime.BootstrapApplication 

Disabling instant start resolves this error. Wait for com.android.tools.build: gradle: 2.0.0-alpha7 ...

Edit 01/25/16

'com.android.tools.build: gradle: 2.0.0-alpha7' was released two days ago.

Getting the same exception as for 2.0.0-alpha6

+49
Jan 15 '16 at 18:55
source share

Just delete the build module folder of the app module and rebuild the project!

This will fix the problem!

+35
Mar 20 '17 at 6:47
source share

I ran into this problem after refactoring and changing the application name in gradle. Following the AskQ example, I rebuilt the project (along a slightly different path):

Build β†’ Clean Project

followed by

Build β†’ Rebuild Project

Solution

+13
Aug 04 '17 at 13:54 on
source share

Android Studio 2.3.3 It worked for me after disabling the instant launch in the settings ...

Go to Settings β†’ Build, Run , and Development β†’ Instant Launch β†’ Uncheck Enable Instant Run for hotswap, then clear the project and create the project again!

+1
Sep 15 '17 at 5:35
source share



All Articles