Android Question [SOLVED] Error when upgrade from sdk 28 to sdk 30

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I just upgrade from sdk 28 to sdk 30.
When I compiled the app with new sdk, it can compiled OK but when ran it, It was forced closed.

Here is the contains of log windows

Logger connected to: 192.168.234.103:5555
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main


The app can compiled and ran OK with sdk 28.

I still use B4A 10.

How to solve this problem.

Here are the contents of manifest editor
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
AddPermission(android.permission.USE_FINGERPRINT)     
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@style/br")
SetApplicationAttribute(android:usesCleartextTraffic, "true")
SetActivityAttribute(Main, android:windowSoftInputMode, adjustPan|stateHidden)
'CreateResourceFromFile(Macro, Themes.DarkTheme)

AddManifestText(<uses-permission
    android:name="android.permission.WRITE_EXTERNAL_STORAGE"
    android:maxSdkVersion="29" />
)

AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <files-path name="name" path="shared" />
)
AddPermission(android.permission.REQUEST_INSTALL_PACKAGES)
 
Last edited:

incendio

Well-Known Member
Licensed User
Longtime User
Why are you insisting on wasting your time with an old version? I can't help here sorry.
This is the reason I doubt to update to the new version.
This new version is required to update to new sdk right?

So, I plan to update, but before that, I tried new sdk before update B4A to 10.2, and what I am afraid of is happen.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
If I'm not wrong, you can always follow the instalation instructions and get a working copy of 10.2 (choosing a different folder of v10) with the recommended OpenJDK in a separate folder, while you maintaine your "old" sdk and B4A 10 until you're sure everything is working.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
I tried B4A 10.2 with sdk 28 & sdk 30, still raised the same error without any error in the log window.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
I tried B4A 10.2 with sdk 28 & sdk 30,
Did you download the new jdk too and set up the path to it? Or did you setup the same jdk that in v10?
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
I use jdk 8 and the path is correct.

Now, with new version, I can't even compile my app.

I thing, in the new version, I choose Clean Project in hope that can solved the problem, but after that, compilation failed with an error
Could not find a part of the part ....\Objects\gen\androidx\core.

Back again to B4A 10 & sdk 28, and the app compiled & run OK again.

Tried to compile other app with B4A 10.2 was OK.

I think, there is something in the error app that could not be handled by sdk 30 or perhaps there's obsolete api, but I don't know what is that.
 
Last edited:
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
use sdk=29 for now.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
use sdk=29 for now.
I have use sdk=29, but with sdk 30 downloaded from B4A in the section how to install latest B4A, stil no avail.
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
Why do you want to use sdk=30?

not sure if this link help:
 
Last edited:
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
Take a reinstallation of everything from scratch following this tutorial...
Otherwise you are just wasting your time ...
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
I have return to B4A 10 and found the problem.
Now my app was compiled and runs OK.

It was not related to sdk 30 or sdk 29, though in manifest file I have changed target sdk to 29.
Probably it was a bug from B4A 10, I wonder if this bug still exist in B4A 10.2.

I will try to reproduce the steps that lead to the bug and caused this error.

Thank to all who are willing to help and not willing to help caused still using the 'old' version.
 
Upvote 0
Top