B4A Library AdsHelper extends FirebaseAdMob2 / Google Mobile Ads v20.0+

Status
Not open for further replies.

SMOOTSARA

Active Member
Licensed User
Longtime User


Hi
I get an error when I run the example.
What is the cause of this error message?
Thanks

B4X:
B4A Version: 10.90
Parsing code.    (0.04s)
    Java Version: 11
Building folders structure.    (0.01s)
Running custom action.    (0.07s)
Compiling code.    (0.10s)
Compiling layouts code.    (0.02s)
Organizing libraries.    (0.04s)
    (AndroidX SDK)
Compiling resources    (1.56s)
Linking resources    (0.59s)
Compiling debugger engine code.    (2.49s)
Compiling generated Java code.    (3.46s)
Convert byte code - optimized dex.    Error
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
    at com.android.dx.merge.DexMerger$8.updateIndex(DexMerger.java:565)
    at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:276)
    at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:574)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:166)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:198)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:336)
    at com.android.dx.command.dexer.Main.runDx(Main.java:293)
    at com.android.dx.command.dexer.Main.main(Main.java:249)
    at com.android.dx.command.Main.main(Main.java:94)
 

Rubsanpe

Active Member
Licensed User
Hi you need add #MultiDex: true to Project attributes.

Rubén
 

SMOOTSARA

Active Member
Licensed User
Longtime User
Hi you need add #MultiDex: true to Project attributes.

Rubén

Hi
add #MultiDex: but I get an error
B4X:
B4A Version: 10.90
Parsing code.    (0.03s)
    Java Version: 11
Building folders structure.    (0.15s)
Running custom action.    (0.07s)
Compiling code.    (0.10s)
Compiling layouts code.    (0.01s)
Organizing libraries.    (0.03s)
    (AndroidX SDK)
Compiling resources    (1.52s)
Linking resources    (0.58s)
Compiling debugger engine code.    (2.37s)
Compiling generated Java code.    (3.05s)
Convert byte code - optimized dex.    Error
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Library dex files are not supported in multi-dex mode
    at com.android.dx.command.dexer.Main.runMultiDex(Main.java:371)
    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)
 

Rubsanpe

Active Member
Licensed User
If I remember correctly, this error occurred when the Android SDK had some libraries that were not needed. I think I solved it by reinstalling the SDK and selecting only the necessary components.

Rubén
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…