CoXier / LowPoly

LowPoly For Android
885 stars 74 forks source link

couldn't find "liblowpoly.so" #6

Closed abhriyaroy closed 7 years ago

abhriyaroy commented 7 years ago

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/zebrostudio.wallr100-1/base.apk"],nativeLibraryDirectories=[/data/app/zebrostudio.wallr100-1/lib/arm64, /data/app/zebrostudio.wallr100-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "liblowpoly.so" at java.lang.Runtime.loadLibrary(Runtime.java:367) at java.lang.System.loadLibrary(System.java:1076) at com.uniquestudio.lowpoly.LowPoly.(LowPoly.java:15)

CoXier commented 7 years ago

I think you didn't load the .so file

abhriyaroy commented 7 years ago

Please tell me how do i do that?

CoXier commented 7 years ago

Which way?Import module or dependency? Today I just fix a bug on pre Android-L so you can import it as a dependency

abhriyaroy commented 7 years ago

I did it module way.

abhriyaroy commented 7 years ago

I created a new project where i just imported lowpoly and ran it. It was working fine and then i copied all my classes and libraries into that project and then lowpoly wont run anymore. Its giving the same error--- java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/zebrostudio.wallr100-1/base.apk"],nativeLibraryDirectories=[/data/app/zebrostudio.wallr100-1/lib/arm64, /data/app/zebrostudio.wallr100-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "liblowpoly.so" at java.lang.Runtime.loadLibrary(Runtime.java:367) at java.lang.System.loadLibrary(System.java:1076) at com.uniquestudio.lowpoly.LowPoly.(LowPoly.java:15)

Please help

CoXier commented 7 years ago

Please see this rep

drakeet commented 7 years ago

Maybe you should add:

ndk {
        abiFilters "armeabi", "armeabi-v8a", "x86"
}

Because if your so libs types are not the same, it will cause the case.

abhriyaroy commented 7 years ago

I manually copied them to the jniLibs folder. Didn't work still.

abhriyaroy commented 7 years ago

I found out the reason behind this crash. It just stops functioning when I use the uCrop[https://github.com/Yalantis/uCrop] library(native mode) or the BlurView[https://github.com/Dimezis/BlurView] library. Could you please suggest any fix to this?

abhriyaroy commented 7 years ago

Any fix?

CoXier commented 7 years ago

In fact I do not know the reason.When you only use this library, will it crash?

abhriyaroy commented 7 years ago

Yes. uCrop and Blurview work fine with each other. But only when I include Lowpoly, it crashes saying can't find liblowpoly.so

abhriyaroy commented 7 years ago

Thanks. The fix issue #7 solved my problem as well.

abhriyaroy commented 7 years ago

The fix issue #7 solved the problem for all pre lolipop devices. However it still persists on marshmallow and post marshmallow devices. Could you please help?

abhriyaroy commented 7 years ago

For anyone who is facing the same issue, just do what @drakeet said.

Add the following to the defaultConfig in the gradle of your app ndk { abiFilters "armeabi", "armeabi-v8a", "x86" } And also paste android.useDeprecatedNdk=true in the gradle.properties file of the project. This seems to be the only fix since the library does not provide 64-bit support.