-
Notifications
You must be signed in to change notification settings - Fork 173
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
UnsatisfiedLinkError on some devices #14
Comments
Could you show the crash stack? This may be caused by the *.so library was broken or the system doesn't put it on the correct directory, so I think you can put the *.so into your apk's assets directory, when you catch UnsatisfiedLinkError, you can load the library from assets. |
*.so is not broken because the same apk works on some devices whereas it does not on some other. I tried to load library in a different way when I catch UnsatisfiedLinkError, like About your suggestion, If I put my *.so into my ape's assets directory what would be the correct path to load it. Is it |
Well, you can copy the *.so into the directory like /data/data/your.package.name/recover_lib when the app is initializing, and if you catch UnsatisfiedLinkError after call System.loadLibrary as usual, you can load the library from that directory |
I added this library to my projects, it works properly on some devices but it does not on some others.
System.loadLibrary line, throws an exception because library cannot be loaded. I unzip the apk and check libAndroidImageFilter.so is created for all architecture.
There is no common among problematic devices. Some of them are KitKat whereas some other are JellyBean. Most of them are Samsung but there are also several HTC. Also there are a Samsung devices which does not have any crash. Furthermore, even though all of them has armv7 based cpu, there are a few armv7 based devices on which the library is able to run.
In short, I have no idea why it crashes on some devices.
The text was updated successfully, but these errors were encountered: