Android: Unable to load library (94 missing master tables)

I am developing an Android application that uses its own huge library. Some clients complain of a crash on startup, one of them gave us its dump of logcat:

07-19 10:55:15.139 E/AndroidRuntime(16539)FATAL EXCEPTION: AsyncTask #3 07-19 10:55:15.139 E/AndroidRuntime(16539)java.lang.RuntimeException: An error occured while executing doInBackground() 07-19 10:55:15.139 E/AndroidRuntime(16539)at android.os.AsyncTask$3.done(AsyncTask.java:200) 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274) 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.util.concurrent.FutureTask.setException(FutureTask.java:125) 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308) 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.util.concurrent.FutureTask.run(FutureTask.java:138) 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088) 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.lang.Thread.run(Thread.java:1019) 07-19 10:55:15.139 E/AndroidRuntime(16539)Caused by: java.lang.ExceptionInInitializerError 07-19 10:55:15.139 E/AndroidRuntime(16539)at my.app.appinit.NativeInitAsyncTask.doInBackground(NativeInitAsyncTask.java:86) 07-19 10:55:15.139 E/AndroidRuntime(16539)at my.app.appinit.NativeInitAsyncTask.doInBackground(NativeInitAsyncTask.java:44) 07-19 10:55:15.139 E/AndroidRuntime(16539)at android.os.AsyncTask$2.call(AsyncTask.java:185) 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) 07-19 10:55:15.139 E/AndroidRuntime(16539)... 4 more 07-19 10:55:15.139 E/AndroidRuntime(16539)Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1935]: 94 missing essential tables 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.lang.Runtime.loadLibrary(Runtime.java:434) 07-19 10:55:15.139 E/AndroidRuntime(16539)at java.lang.System.loadLibrary(System.java:554) 07-19 10:55:15.139 E/AndroidRuntime(16539)at nativewrapper.NativeObject.<clinit>(NativeObject.java:30) 07-19 10:55:15.139 E/AndroidRuntime(16539)... 8 more 07-19 10:55:15.179 W/ActivityManager(162)Force finishing activity my.app.packagename/my.app.FirstActivity 

Customer phone model is Samsung Galaxy Ace (gt-s5830). After digging around on the Internet, I found this piece of code from the Android linker ( http://source-android.frandroid.com/bionic/linker/linker.c ): looking at it, it seems that the zygote (pid 94) cannot load the library for my application (pid 1935), I canโ€™t find a hint or workaround to fix this, any idea? Thanks.

+6
source share
2 answers

Update your application build with the latest ndk.

java.lang.UnsatisfiedLinkError

An exception occurs due to the inability to find your own library (DLL for Windows / SO for Linux). On UNIX and other systems, this can also be caused by version differences between the run-time libraries on the system and the run-time libraries associated with the pre-built built-in libraries.

0
source

This seems to be a bug in your static block for "LOAD A LIBRARY".

Check these things out

  • remove "lib" from the beginning and ".so" from the end of the library name. for example: if libTest.so library

your code inside the static block should be

 static{ System.loadLibrary("Test"); } 
  • Make sure you clean the project.
0
source

Source: https://habr.com/ru/post/921934/


All Articles