Bug? BETA4: compilation with Firebase does not finish

wimpie3

Well-Known Member
Licensed User
Longtime User
As soon as I add Firebase Analytics & Auth, my compilation time goes from 10 seconds to over a minute, with java.exe using 100%. The first time the compilation times out. When I increase the timeout to 120, I get the following message:
B4X:
B4A Version: 9.00 BETA #4
Parsing code.    (0.04s)
Building folders structure.    (0.01s)
Compiling code.    (0.08s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
Generating R file.    (1.03s)
Compiling debugger engine code.    (1.65s)
Compiling generated Java code.    (3.82s)
Convert byte code - optimized dex.
    Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Unexpected exception in dex writer thread
    at com.android.dx.command.dexer.Main.runMultiDex(Main.java:401)
    at com.android.dx.command.dexer.Main.runDx(Main.java:291)
    at com.android.dx.command.dexer.Main.main(Main.java:249)
    at com.android.dx.command.Main.main(Main.java:94)

FirebaseAnalytics v. 1.02
FirebaseAuth v. 1.06

#Multidex: true

Added in manifest:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)
 
Last edited:

wimpie3

Well-Known Member
Licensed User
Longtime User
Unfortunately it seems I'm using too many libraries (about 10). As soon as I add FirebaseAnalytics and FirebaseAuth, the compiler tells me I have to use MultiDex=true. So I really have no choice.
 

wimpie3

Well-Known Member
Licensed User
Longtime User
I made the mistake to modify the INI file while B4A was still open. It runs without issues now after increasing MaxRamForDex to 4096 (although still on the slow side, probably because Firebase is a large library). Perhaps you could consider adding this as a setting you can modify inside B4A instead of passing through an INI file? Thanks for your help.
 
Top