Android Question Trouble with upgrading App for Android 11

Steini1980

Active Member
Licensed User
Longtime User
Hi Guys,

I can currently no longer roll out apk updates for my non-market app for Android 11 tablets, so I have to upgrade my app to a newer SDK version.

As soon as I use new internal libs, such as FileProvider or RuntimePermissions, I get the following errors when compiling:

B4X:
B4A Version: 11.00
Parse den Code.    (0.51s)
    Java Version: 11
Building folders structure.    (0.03s)
Kompiliere den Code.    (1.44s)
Kompiliere Layoutcode.    (0.03s)
Organisiere Libraries.    (0.00s)
    (AndroidX SDK)
Ressourcen zusammenstellen    (0.17s)
Ressourcen verknüpfen    Error
d:\android\tools\..\extras\b4a_remote\androidx\core\core\1.6.0\unpacked-core-1.6.0\res\values\values.xml:186: error: resource android:attr/fontStyle not found.
d:\android\tools\..\extras\b4a_remote\androidx\core\core\1.6.0\unpacked-core-1.6.0\res\values\values.xml:187: error: resource android:attr/font not found.
d:\android\tools\..\extras\b4a_remote\androidx\core\core\1.6.0\unpacked-core-1.6.0\res\values\values.xml:188: error: resource android:attr/fontWeight not found.

Seems as if a path was entered incorrectly somewhere but I can't find the error. who can help me?
 

Steini1980

Active Member
Licensed User
Longtime User
Thank you Erel,
after reinstall I got this Error with Android-28.jar:

B4X:
Byte-Code konvertieren - optimiert 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)
2 errors; aborting

How can I solve this? There are still many devices with Android Lollipop (min-sdk 22) in use, but also some new devices with Android 11
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
after reinstall I got this Error with Android-28.jar:
If you reinstall you DO NOT INSTALL a android28 jar! A fresh setup installs platform 30 jar only.

So i expect you did something wrong or not doing a fresh reinstall at all.

Again:

- DELETE your SDK.
- Setup a new one.
- Make sure to configure the ide to use this new sdk. Select platforms-30/android.jar
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
. I tried different Versions of the Android-SDK
You MUST use the one here, and you MUST follow the instructions exactly and extract the zips with 7-ZIp


Do NOT run SDK Manager unless you really know why you need to.
 
Upvote 0

Steini1980

Active Member
Licensed User
Longtime User
After Deleting, Downloading and Unpacking I got this Error while compiling:

B4X:
B4A Version: 11.00
Parse den Code.    (0.22s)
    Java Version: 11
Building folders structure.    (0.22s)
Kompiliere den Code.    (0.18s)
Kompiliere Layoutcode.    (0.03s)
Organisiere Libraries.    Error
Maven artifact nicht gefunden: com.android.support/support-v4
 
Upvote 0

Steini1980

Active Member
Licensed User
Longtime User
Now it seems good, first attempt I moved the old ressources just in a Subfolder. Now I zipped this subfolder and deleted the folder.
After unpacking again, everything works fine.

Thanks a lot
 
Upvote 0
Top