Stericson/RootShell

Gradle build fails at time of debugging with the RootShell present as aar

ashishkrishnan opened this issue · 0 comments

The error throws up when Gradle is building for the deployment on a device for debugging

This is the stackstrace using
./gradlew clean build --full-stacktrace --info

Error:

processing com/stericson/RootShell/containers/RootClass.class...
Dex: Error converting bytecode to dex:
Cause: java.lang.RuntimeException: Exception parsing classes
    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.RuntimeException: Exception parsing classes
        at com.android.dx.command.dexer.Main.processClass(Main.java:781)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:747)
        at com.android.dx.command.dexer.Main.access$1200(Main.java:88)
        at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1689)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:695)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:592)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:321)
        at com.android.dx.command.dexer.Main.run(Main.java:292)
        at com.android.builder.internal.compiler.DexWrapper.run(DexWrapper.java:54)
        at com.android.builder.core.DexByteCodeConverter.lambda$dexInProcess$0(DexByteCodeConverter.java:174)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: com.android.dx.cf.iface.ParseException: class name (com/stericson/rootshell/containers/RootClass) does not match path (com/stericson/RootShell/containers/RootClass.class)
        at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:520)
        at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
        at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
        at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
        at com.android.dx.command.dexer.Main.parseClass(Main.java:793)
        at com.android.dx.command.dexer.Main.access$1600(Main.java:88)
        at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1728)
        at com.android.dx.command.dexer.Main.processClass(Main.java:779)
        ... 16 more
    
1 error; aborting
:app:transformClassesWithDexForDebug FAILED
:app:transformClassesWithDexForDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.091 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex '/home/ashish/.android/build-cache/d7b9690e742fb74914c8f6e13a90e030a20cd61a/output/jars/classes.jar' to '/home/ashish/Work/experiments/Location-sample/app/build/intermediates/pre-dexed/debug/classes_a8b01eddcc4d24ab0b2b79d47a2fa5e5828a8a50.jar'

Any fix for this?