Android电报应用 - > JNI在应用程序中检测到错误:JNI GetFieldID调用挂起异常'java.lang.ClassNotFoundException'

时间:2016-03-14 13:29:00

标签: android

我试图通过源代码构建一个自己的Telegram应用程序,但是在生成本机文件并调试它之后。在System.loadLibrary()行中,它以下列错误停止

03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: JNI GetFieldID called with pending exception 'java.lang.ClassNotFoundException' thrown in unknown throw location
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]     in call to GetFieldID
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]     from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.String)
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   | group="main" sCount=0 dsCount=0 obj=0x72c85000 self=0xb8caced0
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   | sysTid=18870 nice=0 cgrp=default sched=0/0 handle=0xb6f8bbec
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   | state=R schedstat=( 774073910 85715465 415 ) utm=72 stm=5 core=2 HZ=100
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   | stack=0xbe041000-0xbe043000 stackSize=8MB
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   | held mutexes= "mutator lock"(shared held)
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #00 pc 0000484c  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #01 pc 00003031  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #02 pc 00243b8b  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream >&, int, char const*, art::mirror::ArtMethod*, BacktraceMap*)+70)
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #03 pc 002282af  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream >&, BacktraceMap*) const+154)
03-14 16:07:46.225 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #04 pc 000b00dd  /system/lib/libart.so (art::JniAbort(char const*, char const*)+584)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #05 pc 000b0825  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #06 pc 000b3967  /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+1286)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #07 pc 000b5bb3  /system/lib/libart.so (art::CheckJNI::GetFieldID(_JNIEnv*, _jclass*, char const*, char const*)+26)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #08 pc 000c61c8  /data/app/org.melegram.messenger-1/lib/arm/libtmessages.19.so (sqliteOnJNILoad+64)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #09 pc 000c5c18  /data/app/org.melegram.messenger-1/lib/arm/libtmessages.19.so (JNI_OnLoad+84)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #10 pc 001d2c41  /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(std::__1::basic_string, std::__1::allocator > const&, art::Handle, std::__1::basic_string, std::__1::allocator >*)+1584)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #11 pc 001f7de5  /system/lib/libart.so (art::Runtime_nativeLoad(_JNIEnv*, _jclass*, _jstring*, _jobject*, _jstring*)+528)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   native: #12 pc 000797dd  /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Runtime_nativeLoad__Ljava_lang_String_2Ljava_lang_ClassLoader_2Ljava_lang_String_2+152)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at java.lang.Runtime.nativeLoad(Native method)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at java.lang.Runtime.doLoad(Runtime.java:428)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   - locked  (a java.lang.Runtime)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at java.lang.Runtime.loadLibrary(Runtime.java:369)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at java.lang.System.loadLibrary(System.java:988)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at org.melegram.messenger.NativeLoader.initNativeLibs(NativeLoader.java:176)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   - locked  (a java.lang.Class)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at org.melegram.messenger.ApplicationLoader.onCreate(ApplicationLoader.java:267)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4659)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at android.app.ActivityThread.access$1500(ActivityThread.java:156)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at android.os.Handler.dispatchMessage(Handler.java:102)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at android.os.Looper.loop(Looper.java:211)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at android.app.ActivityThread.main(ActivityThread.java:5371)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at java.lang.reflect.Method.invoke!(Native method)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at java.lang.reflect.Method.invoke(Method.java:372)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:945)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:740)
03-14 16:07:46.226 18870-18870/org.melegram.messenger A/art: art/runtime/check_jni.cc:65] 
03-14 16:07:46.286 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295] Runtime aborting...
03-14 16:07:46.286 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295] Aborting thread:
03-14 16:07:46.286 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295] "main" prio=5 tid=1 Native
03-14 16:07:46.286 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   | group="" sCount=0 dsCount=0 obj=0x72c85000 self=0xb8caced0
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   | sysTid=18870 nice=0 cgrp=default sched=0/0 handle=0xb6f8bbec
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   | state=R schedstat=( 809097712 85715465 416 ) utm=74 stm=6 core=2 HZ=100
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   | stack=0xbe041000-0xbe043000 stackSize=8MB
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   | held mutexes= "abort lock" "mutator lock"(shared held)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #00 pc 0000484c  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #01 pc 00003031  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #02 pc 00243b8b  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream >&, int, char const*, art::mirror::ArtMethod*, BacktraceMap*)+70)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #03 pc 002282af  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream >&, BacktraceMap*) const+154)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #04 pc 0021825d  /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream >&, art::Thread*)+24)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #05 pc 0021850d  /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream >&)+436)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #06 pc 002186e1  /system/lib/libart.so (art::Runtime::Abort()+72)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #07 pc 000a65bb  /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #08 pc 000b02cb  /system/lib/libart.so (art::JniAbort(char const*, char const*)+1078)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #09 pc 000b0825  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+60)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #10 pc 000b3967  /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+1286)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #11 pc 000b5bb3  /system/lib/libart.so (art::CheckJNI::GetFieldID(_JNIEnv*, _jclass*, char const*, char const*)+26)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #12 pc 000c61c8  /data/app/org.melegram.messenger-1/lib/arm/libtmessages.19.so (sqliteOnJNILoad+64)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #13 pc 000c5c18  /data/app/org.melegram.messenger-1/lib/arm/libtmessages.19.so (JNI_OnLoad+84)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #14 pc 001d2c41  /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(std::__1::basic_string, std::__1::allocator > const&, art::Handle, std::__1::basic_string, std::__1::allocator >*)+1584)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #15 pc 001f7de5  /system/lib/libart.so (art::Runtime_nativeLoad(_JNIEnv*, _jclass*, _jstring*, _jobject*, _jstring*)+528)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   native: #16 pc 000797dd  /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Runtime_nativeLoad__Ljava_lang_String_2Ljava_lang_ClassLoader_2Ljava_lang_String_2+152)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.Runtime.nativeLoad(Native method)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.Runtime.doLoad(Runtime.java:428)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   - locked  (a java.lang.Runtime)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.Runtime.loadLibrary(Runtime.java:369)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.System.loadLibrary(System.java:988)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at org.melegram.messenger.NativeLoader.initNativeLibs(NativeLoader.java:176)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   - locked  (a java.lang.Class)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at org.melegram.messenger.ApplicationLoader.onCreate(ApplicationLoader.java:267)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4659)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at android.app.ActivityThread.access$1500(ActivityThread.java:156)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at android.os.Handler.dispatchMessage(Handler.java:102)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at android.os.Looper.loop(Looper.java:211)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at android.app.ActivityThread.main(ActivityThread.java:5371)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.reflect.Method.invoke!(Native method)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.reflect.Method.invoke(Method.java:372)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:945)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:740)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295] Pending exception java.lang.ClassNotFoundException thrown by 'unknown throw location'
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295] java.lang.ClassNotFoundException: Didn't find class "org.telegram.SQLite.SQLitePreparedStatement" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/org.melegram.messenger-1/base.apk"],nativeLibraryDirectories=[/data/app/org.melegram.messenger-1/lib/arm, /vendor/lib, /system/lib]]
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:511)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:469)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.String) (Runtime.java:-2)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.String java.lang.Runtime.doLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:428)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void java.lang.Runtime.loadLibrary(java.lang.String, java.lang.ClassLoader) (Runtime.java:369)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void java.lang.System.loadLibrary(java.lang.String) (System.java:988)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void org.melegram.messenger.NativeLoader.initNativeLibs(android.content.Context) (NativeLoader.java:176)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void org.melegram.messenger.ApplicationLoader.onCreate() (ApplicationLoader.java:267)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void android.app.Instrumentation.callApplicationOnCreate(android.app.Application) (Instrumentation.java:1012)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void android.app.ActivityThread.handleBindApplication(android.app.ActivityThread$AppBindData) (ActivityThread.java:4659)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void android.app.ActivityThread.access$1500(android.app.ActivityThread, android.app.ActivityThread$AppBindData) (ActivityThread.java:156)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1412)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void android.os.Looper.loop() (Looper.java:211)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:5371)
03-14 16:07:46.287 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[], boolean) (Method.java:-2)
03-14 16:07:46.288 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:372)
03-14 16:07:46.288 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:945)
03-14 16:07:46.288 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295]   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:740)
03-14 16:07:46.288 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295] Dumping all threads without appropriate locks held: thread list lock mutator lock
03-14 16:07:46.288 18870-18870/org.melegram.messenger A/art: art/runtime/runtime.cc:295] 
03-14 16:07:46.288 18870-18870/org.melegram.messenger A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 18870 (egram.messenger)

我该如何解决这个问题?这个问题与艺术或dalvik有关吗?

我的Android Studio版本1.5.1 目标测试机android 5.1.1

0 个答案:

没有答案