在我的acer液态金属(2.3.6)上运行时,我得到了不满意的链接错误异常
异常
06-20 18:47:30.184: E/AndroidRuntime(8121): FATAL EXCEPTION: main
06-20 18:47:30.184: E/AndroidRuntime(8121): java.lang.ExceptionInInitializerError
06-20 18:47:30.184: E/AndroidRuntime(8121): at java.lang.Class.newInstanceImpl(Native Method)
06-20 18:47:30.184: E/AndroidRuntime(8121): at java.lang.Class.newInstance(Class.java:1409)
06-20 18:47:30.184: E/AndroidRuntime(8121): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-20 18:47:30.184: E/AndroidRuntime(8121): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1563)
06-20 18:47:30.184: E/AndroidRuntime(8121): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1681)
06-20 18:47:30.184: E/AndroidRuntime(8121): at android.app.ActivityThread.access$1500(ActivityThread.java:118)
06-20 18:47:30.184: E/AndroidRuntime(8121): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:933)
06-20 18:47:30.184: E/AndroidRuntime(8121): at android.os.Handler.dispatchMessage(Handler.java:99)
06-20 18:47:30.184: E/AndroidRuntime(8121): at android.os.Looper.loop(Looper.java:130)
06-20 18:47:30.184: E/AndroidRuntime(8121): at android.app.ActivityThread.main(ActivityThread.java:3701)
06-20 18:47:30.184: E/AndroidRuntime(8121): at java.lang.reflect.Method.invokeNative(Native Method)
06-20 18:47:30.184: E/AndroidRuntime(8121): at java.lang.reflect.Method.invoke(Method.java:507)
06-20 18:47:30.184: E/AndroidRuntime(8121): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875)
06-20 18:47:30.184: E/AndroidRuntime(8121): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
06-20 18:47:30.184: E/AndroidRuntime(8121): at dalvik.system.NativeStart.main(Native Method)
06-20 18:47:30.184: E/AndroidRuntime(8121): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load main: findLibrary returned null
06-20 18:47:30.184: E/AndroidRuntime(8121): at java.lang.Runtime.loadLibrary(Runtime.java:429)
06-20 18:47:30.184: E/AndroidRuntime(8121): at java.lang.System.loadLibrary(System.java:554)
06-20 18:47:30.184: E/AndroidRuntime(8121): at com.lingopal.TranslationScreen.<clinit>(TranslationScreen.java:1032)
06-20 18:47:30.184: E/AndroidRuntime(8121): ... 15 more
我在armeabi和armeabi-v7a目录中都有libmain.so文件。
感谢任何帮助。
答案 0 :(得分:0)
Android上的链接器错误通常是由不正确或丢失的LoadLibrary调用引起的。您应该在Java代码的静态部分中以反向依赖顺序指定正在使用的每个动态库。例如:
static
{
System.loadLibrary("fmodex");
System.loadLibrary("main");
}