Android Question Compile error when implementing FirebaseAdmob2 in B4A v10.9

al.khal4

New Member
Licensed User
Longtime User
Hello everyone

I hope that you can help me understand what I am doing wrong.
I have created a test app to simulate the issue I have.
below is the error I get, this mainly happens when I compile the app

Compile Error:
B4A Version: 10.90
Parsing code.    (0.00s)
    Java Version: 11
Building folders structure.    (0.02s)
Compiling code.    (0.03s)
    
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.01s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (0.76s)
Linking resources    (0.36s)
Compiling generated Java code.    (1.79s)
Convert byte code - optimized dex.    Error
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:315)
    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)
Caused by: java.lang.InterruptedException: Too many errors
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:684)
    ... 4 more

I am attaching the test app,
Any help with this is appreciated. is it a bug or I am missing something?
When I remove the FirebaseAdmob2 library I don't experience any issue with compiling.
Thanks
 

Attachments

  • test_app.zip
    429.4 KB · Views: 241

al.khal4

New Member
Licensed User
Longtime User
Thanks for the reply
I did that and I am still getting the same error

B4X:
B4A Version: 10.90
Parsing code.    (0.00s)
    Java Version: 11
Building folders structure.    (0.02s)
Compiling code.    (0.02s)
    
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (0.25s)
Linking resources    (0.46s)
Compiling generated Java code.    (1.80s)
Convert byte code - optimized dex.    Error
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
5 errors; aborting

I never had that in the past when working with v10.70
I don't know what to do ?
 
Upvote 0

al.khal4

New Member
Licensed User
Longtime User
Well I a managed to compile the app now without errors
I used the SDK in the second link in step 2 at https://www.b4x.com/b4a.html
The one under the link "SDK license"
I noted that there is two different links to "Android SDK Command line tools"
the first was causing the issues!
also I decided to listen to the advice for not running B4A SDK Manager

Thanks for checking this for me. ?
 
Upvote 0

al.khal4

New Member
Licensed User
Longtime User
In Step 2 URL page: https://www.b4x.com/b4a.html
First link to "Android SDK Command line tools" is the hyperlink

"Download Android SDK Command line tools"
Points to https://dl.google.com/android/repository/commandlinetools-win-6609375_latest.zip

Second link is hyperlinked in the quote
"Make sure to read and agree to the SDK license"
The word SDK license points to https://developer.android.com/studio/index.html#command-tools

The SDK tools package I downloaded for Windows is called "commandlinetools-win-7302050_latest.zip"

I found this confusing because I would normally click on the first link, but both are different, the first will install the a folder called "tools"
While the second installs a folder called "cmdline-tools"
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Upvote 0
Top