Android Question B4A environment broken for me after upgrade from 9.50 to 11.0

shhammer5634

Member
Licensed User
Longtime User
I need some help from the collective mind please.

Today I upgraded my b4a environment from 9.50 to 11.0. An app I wrote in 9.50 needed to be updated to api 30, and I was having trouble loading it on my test phone after compiling.

After upgrading, I get this message:

Signing package file (debug key). Error
java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

I went back to the b4a download page and went through the instructions. With the thought something might be wrong with my Android tools, I created a new Android folder, downloaded the tools and support files and pointed the paths to the new folder. When I did that, I get this message:

[IDE message - 9:28:50]
An error occurred.
Maven artifact not found: com.android.support/support-v4

I am currently using Java 8.

I'm sure I've missed something, I just don't know what.
 

DonManfred

Expert
Licensed User
Longtime User
From 9.5 to 11 you need to INSTALL a new SDK. The SDK has changed and are not compatible anylonger.
Delete the old SDK and install a fresh one based on the newest Downloads from https://www.b4x.com/b4a.html

Make sure to adapt the path in the Ide (Tools-Configure Paths) for the newly installed SDK.

Probably you also need to switch to Java 11 from above link too.
 
Upvote 0

shhammer5634

Member
Licensed User
Longtime User
From 9.5 to 11 you need to INSTALL a new SDK. The SDK has changed and are not compatible anylonger.
Delete the old SDK and install a fresh one based on the newest Downloads from https://www.b4x.com/b4a.html

Make sure to adapt the path in the Ide (Tools-Configure Paths) for the newly installed SDK.

Probably you also need to switch to Java 11 from above link too.
I presume you are referring to step 2 in the link. I did that before making the previous post. That's when I got the Maven artifact not found notice.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Upvote 0

shhammer5634

Member
Licensed User
Longtime User
Forum search still works!
Thanks. It does. And I did before posting. It also helps when you know what you're looking for which I didn't. In the interim I was able to resolve the issue. The answer was to go into the SDK manager and search for the missing package and install it. I'm now on to other issues.

I appreciate everyones help.
 
Upvote 0

Elric

Well-Known Member
Licensed User
Hello everybody!

I've not use B4X for more than a couple of mounths.

I've the same issue:
The compile & rapid debug window gives me:
B4X:
B4A Version: 11.00
Parsing code.    (0.13s)
    Java Version: 11
Building folders structure.    (0.10s)
Running custom action.    (0.18s)
Compiling code.    (0.52s)
Compiling layouts code.    (0.01s)
Organizing libraries.    Error
Maven artifact not found: androidx.annotation/annotation-experimental

And also this
1637266956120.png
appears at B4X starting and when I check my "Configure Paths".

I've updated the library XuiViews (to 2.54) and B4XPreferencesDialog (to 1.75). Every library is updated. I confident that any Additional library is in D:\B4X\B4X_AdditionalLibraries.

I've tried to Jetifier (AndroidX) from Tools menu but the window says me that "All Set. Nothing to do!"

I've also tries to delete everything and to unzip and instal again B4A but nothing is changed.

Any suggestion?

Thank you!
 
Upvote 0

Elric

Well-Known Member
Licensed User
Thank you @jahswant.

I read on https://www.b4x.com/b4a.html
Note that you don't need to run B4A Sdk Manager, unless you want to use the Android emulator, which is less recommended.
Anyway, I've run the SDK Manager and there is no recommended items, just "Installed" and "All" (only these could be installed but no one of these is recommended) but I've looked for
androidx.annotation
found it and installed.

Now the problem is:
B4A Version: 11.00
Parsing code. (0.13s)
Java Version: 11
Building folders structure. (0.14s)
Running custom action. (0.31s)
Compiling code. (0.43s)
Compiling layouts code. (0.01s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.32s)
Linking resources Error
d:\android\tools\..\extras\b4a_remote\androidx\core\core\1.7.0\unpacked-core-1.7.0\res\values\values.xml:113: error: resource android:attr/lStar not found.
error: failed linking references.
 
Upvote 0

jahswant

Well-Known Member
Licensed User
Longtime User
Please delete the current SDK folder and download latest resources from b4a installation page. It will work !
 
Upvote 0

Elric

Well-Known Member
Licensed User
I've deleted anything in D:\Android and I've downloaded again :
- Android SDK Command line tools (i.e. commandlinetools-win-6609375_latest.zip)
- the SDK license (i.e. commandlinetools-win-7583922_latest.zip) - I take care to agree the terms
- the required resources (i.e. resources_06_21.zip)

Now:
commandlinetools-win-6609375_latest.zip contains the folder "tool", which contain "bin" folder, "lib" folder, NOTICE.txt and source.properties.
1637271316726.png

but the commandlinetools-win-7583922_latest.zip contains the folder "cmdline-tools", which contain "bin" folder, "lib" folder, NOTICE.txt and source.properties.
1637271175482.png


Attempt 1 - just extract all zip files in D:\Android - I can note that comparing to this image this image I got the folder "cmdline-tools":
1637271470195.png


Anyway, I ran B4A, the SDK Manager and look for an update but there is no recommended items to install. Unfortunately, I get the same message:

Linking resources Error
d:\android\tools\..\extras\b4a_remote\androidx\core\core\1.7.0\unpacked-core-1.7.0\res\values\values.xml:113: error: resource android:attr/lStar not found.
error: failed linking references.

So I've tried to extract commandlinetools-win-7583922_latest.zip not in "cmdline-tools" folder but in "tools" folder, overwriting. Nothing is changed.

Maybe I've to download the SDK Build Tools (even if they are not recommended)?
 
Last edited:
Upvote 0
Top