-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.UnsatisfiedLinkError #28
Comments
Hi Why "again" the title? Previous error was "java.lang.NullPointerException", this is "java.lang.UnsatisfiedLinkError". Method getString() is part of the QtAndroidTools library. It's called by the AndroidApkExpansionFiles java object to get the internal string translation by using the Qt translation engine (at cpp level). Said that it's quite strange, it seems there was an error in the java objects loading but is not a problem of the library code. Is there, in all the cases, some common point like android version or so on? |
Oh, right. I thought the GetString function was a basic function proposed in the Google packages. You can see that Android 9 and 10 versions are overrepresented as well as Huawei devices. The Console play counter announces 322 crashes this month but in reality the same user can restart the application 30 times to try to make it start. |
There is also another similar error in the console play that affected only one Galaxy M01s (android 10) :
|
There may be a lead here: https://medium.com/keepsafe-engineering/the-perils-of-loading-native-libraries-on-android-befa49dce2db. Maybe it would be possible to use Context.getApplicationInfo().sourceDir; to get around the GetString problem... |
This is the code registering the callback:
The only reasons in fail of registering is that the java object was not correctly loaded but, since the java object start to download it's mean the command has been received and the java object has been loaded correctly. The only thing that comes to mind is that there was a problem installing the apk and not all objects were copied correctly, but it's just a guess since, anyway, the download process seems to have started... |
Hi |
Hi ! Unfortunately, I still have errors of the type java.lang.UnsatisfiedLinkError which concern the getString function. Is there any way to display an error message before the crash? Thanks ! |
Hi The error happens continuously or randomly? I mean, in the device where you see this error the app never start always cause this error or sometimes start and sometimes not? |
It never starts. I see sometimes the same user trying 20 times without success... |
I'll try to make some change but without reproduce the issue is quite hard to know why in some devices doesn't work... |
Try the latest committed version. I changed the way strings are managed by removing the direct native link generating the error (however I can not guarantee the problem was fixed because I'm unable to reproduce it). Please, keep me informed about the news. |
Thanks! I will give it a try! |
Fabio, using the last comit (106), I have the application crashing at startup with this log: W net.winstars3: Accessing hidden field Landroid/R$styleable;->ViewDrawableStates:[I (greylist, reflection, allowed) |
In what kind of of system do you see this error? (android version, emulator or physical device, etc.). Try deleting the folder where all the files are compiled and try again... |
I just deleted the build directory (the folder where all the files are compiled) and restarted but I still get a crash on startup. I compile for SDK-30 (Android 11) and I did the test on a physical device armv7. |
If you switch back to latest tagged version 1.5 do you see same crash? |
No. Everything works fine with version 1.5 |
It's really difficult to know why this error come out. Can you test the QtAndroisTools demo app? The app will not download any file but will initialize the java object that seems the point where the crash is generated... |
Hi Fabio! I just compiled the QtAndroidTools example and it works perfectly! |
An interesting hint: the demo program starts normally on your mobile but when I try to use the apk management module (ApkExpansionFiles), the demo program crashes too! And this is the only thing I use in my software... |
The crash is the same? |
Ok, probably found the problem using emulator with android 11. I didn't have the crash because the device I use for test have an old android version. Try the latest committed version and keep me informed about the result. |
It works. The modified version does not crash anymore. Thank you! |
Good, I hope the "original" error UnsatisfiedLinkError will be fixed with this change. If you'll don't see any problem after some time, please, close this issue. |
Hello Fabio! I don't have any more UnsatisfiedLinkError for the moment. I think we can consider the problem solved! |
By the way read this news: https://developer.android.com/guide/app-bundle Note the part reporting "Android App Bundles do not support APK expansion (*.obb) files" and since in the top advise is written "From August 2021, new apps will be required to publish with the Android App Bundle on Google Play" means basically expansion files will not be used anymore... |
Hello,
I still have java.lang.UnsatisfiedLinkError messages in the Google Console Play, with the following log :
This concerns very few users (1%). Sounds like the absence of the getString function in the package.
Is there a dependency problem?
In the build.gradle file, I use :
I don't understand anything about java and gradle. So, maybe I just do anything...
Thanx for your help !
The text was updated successfully, but these errors were encountered: