-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 #51
Comments
Time to time means randomly when running installed application or some compilations are generating broken apk (which causes an error every time it runs) or maybe there isn't any schema? |
No, that is all the same compiled and built apk file, which is works mostly but rarely not. I wasn't able to see any pattern. |
I think it cannot be problem in the library. |
Okay, I also think that's the case. Just wanted to let you know! |
gradle bug :-\
solves this for me |
Another possible reason: https://github.com/koral--/android-gif-drawable/issues/217#issuecomment-148273091 |
For anyone searching for the issue If someone confirms that mentioned workaround works, I'll add it to the library. |
I started having the UnsatisfiedLinkError and I found out that adding this in my gradle build was causing it:
Problem is... I need it! Any ideas? :) |
Interesting I'll check this. That plugin parses JSON from Google API console and generates for you string resources containing stuff like ids for GCM or Google Analytics, API key for Google Maps etc. The same effect can be achieved by manual copy-pasting that values. Not sure how can it be related to I think it is good idea to try with last stable (non-beta) version of |
I'm also getting a UnsatisfiedLinkError:
It's working on my xperia z3 compact but on a nexus 4 with an older android version I'm getting this error. |
@David145 Unfortunately I could not reproduce that on available device, but according that SO post: http://stackoverflow.com/questions/28806373/android-4-2-ndk-library-loading-crash-load-librarylinker-cpp750-soinfo-l there is a workaround for your issue. Could you try adding If it is working I can add include it in library. |
Tried it and added to the onCreate( ) of my main activity, but still getting the same error. I have no clue, what could be the problem, because it worked fine about two weeks ago when I tested it on the same device. It's on android 4.2.2. Maybe this can help us?
|
Was your app been updated during that 2 weeks or it was the same installation and just stopped working? |
Did a lot of things on the app, so it definitely changed, but I can't tell what exactly causes that. The OS on the device stayed the same. |
@David145 so, that may be the same case as described here: I've just added slightly modified ReLinker. To use it call Waiting for some feedback. |
@koral-- Sorry for waiting, wasn't here on the weekend. Just tried to compile the SNAPSHOT and Android Studio is giving me "Failed to resolve: compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.11-SNAPSHOT". |
You need to add maven snapshot repository in |
@koral-- Alright, did that, using How do you think you will implement that workaround in a release version of the library? |
Yes, not sure yet if it will be exactly the same code as in snapshot but something similar will be included. |
@koral-- Hi Koral, it does not work for me. I'm getting this error " dlopen failed: library "/data/data/com.demo.dev/app_lib/libpl_droidsonroids_gif.so" not found" |
@DecentCow could you post complete stacktrace? |
@koral-- here's the stacktrace:
dev is a build variant (maybe it will help you) |
@DecentCow in your case even Relinker did not manage to load native library. Is your scenario the same as described here: https://github.com/koral--/android-gif-drawable/issues/51#issuecomment-155982018? (library loading stopped working after app update) or that is a fresh app installation and loading does not work from the beginning? |
@koral-- Yes, it worked before but now after some updates it does work anymore. |
Also might be worth noting that I tried the 1.1.11 SNAPSHOT and .8, .9 and .10 |
@xiphirx yes there is, in |
so |
@FaizVisram if your stacktrace is the same as last in this thread: https://github.com/koral--/android-gif-drawable/issues/51#issuecomment-157193898 then you are not using the latest snapshot but previous one. |
@koral-- Ah, that did it. I cleared the Gradle cache and it seems to be working for me, I'll let you know if my QA says otherwise (won't get to it until tomorrow at least). |
@koral-- the latest version passed our QA, thought you'd like to know :) Thanks for all your help guys, and thanks for the library too :D |
@David145 @FaizVisram (and others using 1.1.11-SNAPSHOT version), there will be little changes in release version. |
OK, finally this issue can be closed. Workaround should work even without calling |
I still get an issue:
I have the 1.1.11-r1-SNAPSHOT
in my Activity OnCreate. And then add this in my Fragment.
|
|
I do not know what it is really mean. I just use the standard way. However my app is multi-dex (if that can help). |
Your APK file does not have the library file inside of it. You can verify this by renaming your APK to a ZIP file and unpacking it. |
Yes, nothing inside, but why ? |
There can be a lot of reasons, however its not related to this issue and its not an issue with the library. |
is the lib should normally be added from Gradle dependency compile function ? Or is there something else to do ? |
@afaucogney all AARs published to maven repositories contain libraries and they should be placed into resulting APK (in |
@koral-- this is my first native lib integration, feel free to think basic issue ! I just follow the Readme, so
GifDrawable gifFromAssets = null;
try {
gifFromAssets = new GifDrawable(getActivity().getAssets(), "glass_shaking.gif");
} catch (IOException e) {
e.printStackTrace();
} Nothing else added up to now. My app is a multi-dex |
There should be 7 subdirectories in
If you have only 2 directories inside What are the names of that 2 directories which you have in APK? |
@afaucogney issue similar to yours: https://github.com/koral--/android-gif-drawable/issues/237#issuecomment-168169705 |
On the phone (Galaxy S (GT-I9000) and Xperia T (LT30p) running 4.4 and 4.3) of two of my friends I from time to time get this strange error that crashes the app:
Usually this works fine. Could this be a problem of the library or rather an android bug? Thanks!
The text was updated successfully, but these errors were encountered: