Android Question Another "Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba " error

Cliff McKibbin

Member
Licensed User
I have been attempting to convert an existing B4A App to B4X Pages and got hung up with an error (I'll continue that later).

One attempt to resolve it was to check the SDK Manager. I did find four entries and installed them.
Following that, I get the above error on B4A compiles for all of my Apps.

In researching the issue, I found an older blog in which the user was told to delete the SDKs and reload them. I cheated a little and reloaded but copied in all of the support files. This did not solve the situation. I am hoping that did not further complicate the situation, but will see after the steps below. I am pointing to the latest C:\Android\platforms\android-30\android.jar

I then found a forum entry for Lello1964 on May 13, 2021 #130694 App that suggested he start a new app and enter the libs one at a time to find which were at fault. I have done that and found both "Printing" and "Runtime Permissions" must have been trashed.

Could you give me the items in extras\b4a_remote\installedcomponents.txt that I should delete to see if I can reload them successfully?

Is there a list of the libraries vs. components that could be placed somewhere so that everyone would have a resource to fix this type of error? I noticed the problem in a number of forum entries.

Thanks. Cliff McKibbin
 

DonManfred

Expert
Licensed User
Longtime User
Could you give me the items in extras\b4a_remote\installedcomponents.txt that I should delete to see if I can reload them successfully?
ALL needed is in in the two zips you need to download. NO NEED to start the SDK Manager at all.
Follow the installationinstructions carefully: https://www.b4x.com/b4a.html

At least with B4A 10.7 or higher it is MANDATORY to setup a new SDK.
 
Upvote 0

William Lancee

Well-Known Member
Licensed User
Longtime User
I have been attempting to convert an existing B4A App to B4X Pages and got hung up with an error (I'll continue that later).

1. Anywhere software has made the complexities of SDK transparent. But you have to follow EVERY step of the installation without assumptions and without adding more steps.
2. To trace errors in B4XPages, it is helpful to enable B4XPages.GetManager.LogEvents = True in B4XMainPage
3. That being said there are still some programming errors that are really hard to find. Here are two of them. I found them by elimination.
- uninitialized global in a page
- mistyped global in a page (yesterday I had a view that was a label but I had it declared as a pane - it broke on LoadLayout, no meaningful message)
4. Perhaps there should be a list of such things - for example, if it breaks on LoadLayout check declarations
 
Upvote 0

Cliff McKibbin

Member
Licensed User
Don, Thanks. That took care of it. I deleted all entries in c:\android and copied each sub-directory in the two downloads into it. Total time was about 20 minutes for each step, so it was faster than what I had tried to do.
My existing B4A apps now compile.
You stated that with B4A 10.7 and higher it is mandatory that we download the SDKs each time. I don't think I noticed that in the announcements for the releases and I have installed each up to 11.0. Perhaps a reminder in the release notes would be good to make sure everyone re-downloads when required.

William, Thanks as well for the hint on the B4XPages logging. I will set that on and see what I find. I will then start a new thread on the issue if I don't see an answer.
 
Upvote 0
Top