一旦用户登录,Android教程应用程序就会一直崩溃。客户端也无法启动。
Logcat说
08-03 12:45:16.183 1322-1322/com.example.messagingtutorialskeleton W/linker﹕ libhoudini.so has
text relocations. This is wasting memory and is a security risk. Please fix.
08-03 12:45:16.655 1322-1322/com.example.messagingtutorialskeleton A/libc﹕ Fatal signal 11
(SIGSEGV) at 0x000000b4 (code=1), thread 1322 (utorialskeleton)
使用Genymotion模拟器时会发生这种情况。
使用标准的android虚拟设备时,logcat会显示:
08-03 08:45:00.705 2406-2406/com.example.messagingtutorialskeleton E/AndroidRuntime﹕ FATAL
EXCEPTION: main
Process: com.example.messagingtutorialskeleton, PID: 2406
java.lang.UnsatisfiedLinkError: Couldn't load sinch-android-rtc from loader
dalvik.system.PathClassLoader[DexPathList[[zip file
"/data/app/com.example.messagingtutorialskeleton-2.apk"],nativeLibraryDirectories=[/data/app-
lib/com.example.messagingtutorialskeleton-2, /system/lib]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:358)
at java.lang.System.loadLibrary(System.java:526)
at com.sinch.android.rtc.internal.natives.jni.UserAgentFactory.<clinit>
(UserAgentFactory.java:9)
at
com.sinch.android.rtc.internal.client.ServiceFactory.createUserAgent(ServiceFactory.java:43)
at com.sinch.android.rtc.internal.client.DefaultSinchClient.<init>
(DefaultSinchClient.java:144)
at
com.sinch.android.rtc.internal.client.InternalSinchClientFactory.createSinchClient(InternalSinchClie ntFactory.java:13)
at
com.sinch.android.rtc.DefaultSinchClientBuilder.build(DefaultSinchClientBuilder.java:95)
at
com.sinch.messagingtutorialskeleton.MessageService.startSinchClient(MessageService.java:58)
at
com.sinch.messagingtutorialskeleton.MessageService.onStartCommand(MessageService.java:42)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2702)
at android.app.ActivityThread.access$2100(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
问题是什么?感谢。
答案 0 :(得分:1)
是的,我得到了修复!...您只需将所有Sinch架构文件存储到jniLibs文件夹中,如教程中所示。 因此该文件夹将包括三个与SDK一起出现的文件夹; 阿米巴 2 Armeabi-v7a 3. X86
您获得的错误是由于缺少x86文件夹。因此需要做,如果你遇到困难,请问!
答案 1 :(得分:0)
Sinch SDK尚未在Genymotion仿真器上进行测试,因为它还不支持x86。以下是完整的解释:https://github.com/sinch/android-messaging-tutorial/issues/1#issuecomment-50063315
您是否尝试在物理设备上测试应用程序?