Android Question how can i solve this error (Dex code Error)

coddy

Member
B4X: Copy
B4A Version: 12.80
Parsing code.    (0.03s)
    Java Version: 8
Building folders structure.    (0.03s)
Compiling code.    (0.22s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (0.06s)
Linking resources    (0.65s)
Compiling debugger engine code.    (2.46s)
Compiling generated Java code.    (0.02s)
Finding libraries that need to be dexed.    (0.01s)
Dex code    Error
Compilation failed with an internal error.
java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
    at com.android.tools.r8.graph.h0.<init>(:5)
    at com.android.tools.r8.graph.Y.b(:2)
    at com.android.tools.r8.graph.x0$d.b(:8)
    at com.android.tools.r8.A.a.a.f.a(:721)
    at com.android.tools.r8.graph.x0.a(:38)
    at com.android.tools.r8.dex.a$a.a(:12)
    at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1456)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
 
hi Erel
this is the error message

Code: Copy
B4A Version: 12.80
Parsing code.    (0.04s)
    Java Version: 8
Building folders structure.    (0.03s)
Compiling code.    (1.08s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (0.13s)
Linking resources    (0.74s)
Compiling debugger engine code.    (0.00s)
Compiling generated Java code.    (0.02s)
Finding libraries that need to be dexed.    (0.01s)
Dex code    Error
Compilation failed with an internal error.
java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
    at com.android.tools.r8.graph.h0.<init>(:5)
    at com.android.tools.r8.graph.Y.b(:2)
    at com.android.tools.r8.graph.x0$d.b(:8)
    at com.android.tools.r8.A.a.a.f.a(:721)
    at com.android.tools.r8.graph.x0.a(:38)
    at com.android.tools.r8.dex.a$a.a(:12)
    at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1456)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

and this is my configure path
11111.png
 
Upvote 0
and this is my configure path
When you did install the SDK you are using?
I guess it is some years old?

The referenced Android.jar is the wrong one. It should be C:\android\platforms\android-33\Android.jar (this the one which is inside the newest ressources)

I suggest to
- deinstall B4A AND the SDK.
- Install it new based on the Installationinstructions https://www.b4x.com/b4a.html#Installation
 
Last edited:
Upvote 1
Back
Top