Android Question UNEXPECTED TOP-LEVEL EXCEPTION

Mbm

Member
Licensed User
Longtime User
I have installed B4A(v 5.80) in my new Windows 10 computer. I have been working with B4A with my old computer(Windows XP) for three years without problems. But now when I try to compile a Project that Works fine in my old system I get this error:

B4X:
[CODE]B4A version: 5.80

Parsing code.    (0.26s)

Compiling code.    (0.36s)

   

ObfuscatorMap.txt file created in Objects folder.

Compiling layouts code.    (0.04s)

Generating R file.    (0.15s)

Compiling generated Java code.    (2.70s)

Convert byte code - optimized dex.    Error

UNEXPECTED TOP-LEVEL EXCEPTION:

java.lang.NullPointerException

    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)

    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)

    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)

    at com.android.dx.command.dexer.Main.processOne(Main.java:537)

    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)

    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)

    at com.android.dx.command.dexer.Main.run(Main.java:206)

    at com.android.dx.command.dexer.Main.main(Main.java:179)

    at com.android.dx.command.Main.main(Main.java:103)

.

.

.[/CODE]

I have changed MaxRamForDex and ProcessesTimeoutSeconds to:

ProcessesTimeoutSeconds=160
MaxRamForDex=1536

in the b4xV5.ini file with the same result.

Thank you in advance for helping me.
 

Mbm

Member
Licensed User
Longtime User
I have created a new Project with the same error:

B4X:
B4A version: 5.80
Parsing code.    (0.28s)
Compiling code.    (0.29s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.00s)
Generating R file.    (0.17s)
Compiling generated Java code.    (2.87s)
Convert byte code - optimized dex.    Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
18 errors; aborting
 
Upvote 0

Mbm

Member
Licensed User
Longtime User
Yes I have created in c:\b4a

B4X:
B4A version: 5.80
Parsing code.    (0.00s)
Compiling code.    (0.02s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.00s)
Generating R file.    (0.26s)
Compiling generated Java code.    (1.10s)
Convert byte code - dex.    Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
2 errors; aborting
 
Upvote 0

Juan Marrero

Active Member
Licensed User
Longtime User
In my case it was a conflict between HttpUtils2 and OkHttpUtils2. Had them both marked don't know why. Check if this is the case for you, that you have 2 similar libraries checked.
 
Upvote 0

Mbm

Member
Licensed User
Longtime User
I have still the problem with version 6.00.I have a void project with only core library selected.
 
Upvote 0

Mbm

Member
Licensed User
Longtime User
I have uninstalled Android SDK tools and then I have reinstalled it and the error is still there.

B4X:
B4A version: 6.00
Parsing code.    (0.00s)
Compiling code.    (0.01s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
Generating R file.    (0.20s)
Compiling generated Java code.    (0.57s)
Convert byte code - dex.    Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:217)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:537)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:449)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:236)
    at com.android.dx.command.dexer.Main.run(Main.java:206)
    at com.android.dx.command.dexer.Main.main(Main.java:179)
    at com.android.dx.command.Main.main(Main.java:103)
2 errors; aborting
 
Upvote 0
Top