Android Question Error compiling

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Hi, Ive installed the new B4A to a new PC following all instructions, copy a project that compiles ok in another PC and get the following error:

Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)

Ive set the minsdkversion to 26 in the manifest but the error persists.
How to solve it?
Thanks
 

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Thanks Edgar
Ive done all of this post and nothing, cant compile.
How can I post a list of the referenced libraries.?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
How can I post a list of the referenced libraries.?
- Make a screenshot?
- Look at the B4A File; they are listed here if you look at this file with notepad++

What B4A Version are you using?
Did you REMOVED/DELETED the old SDK and installed a new one? Starting from B4A 10.7 (i think) it is mandatory to install a new (changed) SDK.
See https://www.b4x.com/b4a.html for detailed instructions. Follow carefully.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Did you click on menu Tools > Jetifier (Android X) ?
 
Upvote 0

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
No, what does it do?
Theres nothing about it in the installation instructions.
What must I do? I click on it an a window with *.jar list appears.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
It jetifies old libraries created before Android X... Do it and try to recompile. Let us know if it works.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
No, what does it do?
What?
Theres nothing about it in the installation instructions.

v10.7 - March 17, 2021 - https://www.b4x.com/android/forum/threads/b4a-v10-7-is-available-for-download.128734/

  1. New toolchain.
  2. Support for app bundles.
  3. Support for targetSdkVersion=30
The new Toolchain requires a newly installed SDK. FRESH DOWNLOAD as per Instructions.
What must I do?
DELETE your current SDK.
INSTALL as new one (two zips to download from this page. Make sure to use 7Zip to extract. Follow the Installationinstructions Carefully.

https://www.b4x.com/b4a.html
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
After doing what @DonManfred has suggested in previous message do Jetify also because you might have some old libraries that require you to do it.
 
Upvote 0

epiCode

Active Member
Licensed User
No, what does it do?
Theres nothing about it in the installation instructions.
What must I do? I click on it an a window with *.jar list appears.
If nothing works, read this.
 
Upvote 0
Top