libreliodev / android

Android Customizable Reader - Librelio Digital Publishing Suite
www.librelio.com
226 stars 129 forks source link

Couldn't load mupdf from loader #284

Closed libreliodev closed 9 years ago

libreliodev commented 9 years ago

@intrications : it was reported by @Ageleswari that he could not build the latest version successfully (see crash report sent by him). Any idea why?

intrications commented 9 years ago

Not really. Try rebuilding the APK and reinstalling.

Ageleswari commented 9 years ago

still the same after rebuilding and reinstallation many times.

libreliodev commented 9 years ago

@Ageleswari Can you upload the crash report here or on Gist?

Ageleswari commented 9 years ago

12-10 17:28:12.957 8911-12620/com.client.magazine E/ACRA﹕ com.client.magazine fatal error : Couldn't load mupdf from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.client.magazine-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.client.magazine-1, /vendor/lib, /system/lib]]]: findLibrary returned null java.lang.UnsatisfiedLinkError: Couldn't load mupdf from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.client.magazine-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.client.magazine-1, /vendor/lib, /system/lib]]]: findLibrary returned null at java.lang.Runtime.loadLibrary(Runtime.java:358) at java.lang.System.loadLibrary(System.java:526) at com.artifex.mupdfdemo.MuPDFCore.(MuPDFCore.java:20) at com.client.magazine.utils.PDFParser.(PDFParser.java:31) at com.client.magazine.service.MagazineDownloadService.addAssetsToDatabase(MagazineDownloadService.java:275) at com.client.magazine.service.MagazineDownloadService.downloadMagazine(MagazineDownloadService.java:208) at com.client.magazine.service.MagazineDownloadService.doWakefulWork(MagazineDownloadService.java:81) at com.commonsware.cwac.wakeful.WakefulIntentService.onHandleIntent(WakefulIntentService.java:109) at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:212) at android.os.HandlerThread.run(HandlerThread.java:61)

libreliodev commented 9 years ago

@intrications Do you have other suggestions please?

intrications commented 9 years ago

@Ageleswari Have you tried on a different device or in the emulator?

Have you changed the code at all?

How did you change the package name? In the build.gradle file?

Ageleswari commented 9 years ago

yes i tried in different devices, and all has the same results i did not change the code but i did change the package name. i changed it manually using refactor and rename in the package right clicked menu pop out. (it is the same as my application id)

intrications commented 9 years ago

@Ageleswari

Did you try and compile and run the project before making any changes? If not, then please download a fresh copy of the repo and try.

Please change the package name just by changing the applicationId in the build.gradle file. There is no need to change the package structure.

If you change the package name manually then you will find it very difficult to merge future commits into your code because directories will change name. This could also be the reason why the native MuPDF libraries can't be found.

Ageleswari commented 9 years ago

Hello, sorry took very long to reply, we were busy regarding the app launch. We managed to get the bug fixed. it wasn't because of the package name. It was because we forgot to include few libraries into the project. Thank you.

libreliodev commented 9 years ago

@Ageleswari Thanks for the feedback.

cc @intrications

ammaratef45 commented 7 years ago

I have the same problem so how did you solve it?

utrucceh commented 7 years ago

put .so libs to jniLibs folder. Example: src/main/jniLibs/*