0

我正在将 android 中的 Twilio 视频与我的 adobe air 应用程序集成。我可以在 ane 中成功添加视频 sdk,但 twilio 视频 sdk 使用 com.getkeepsafe.relinker SDK。

这个SDK给了我以下错误

Process: air.TestApp, PID: 585
java.lang.RuntimeException: Unable to start activity ComponentInfo{air.TestApp/com.nethram.video.views.MainActivity}: com.getkeepsafe.relinker.MissingLibraryException: lib/armeabi/libjingle_peerconnection_so.so
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2456)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539)
   at android.app.ActivityThread.access$900(ActivityThread.java:159)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:152)
   at android.app.ActivityThread.main(ActivityThread.java:5507)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: com.getkeepsafe.relinker.MissingLibraryException: lib/armeabi/libjingle_peerconnection_so.so
   at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary(ApkLibraryInstaller.java:85)
   at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:180)
   at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
   at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
   at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:51)
   at com.twilio.video.MediaFactory.instance(MediaFactory.java:47)
   at com.twilio.video.LocalAudioTrack.create(LocalAudioTrack.java:98)
   at com.twilio.video.LocalAudioTrack.create(LocalAudioTrack.java:75)
   at com.nethram.video.views.MainActivity.createAudioAndVideoTracks(MainActivity.java:260)
   at com.nethram.video.views.MainActivity.onCreate(MainActivity.java:131)
   at android.app.Activity.performCreate(Activity.java:6304)
   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2539) 
   at android.app.ActivityThread.access$900(ActivityThread.java:159) 
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384) 
   at android.os.Handler.dispatchMessage(Handler.java:102) 
   at android.os.Looper.loop(Looper.java:152) 
   at android.app.ActivityThread.main(ActivityThread.java:5507) 
   at java.lang.reflect.Method.invoke(Native Method) 
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

当我查看这个错误时,我认为这个包使用了 armeabi split。

有什么方法可以解决这个问题吗?

4

1 回答 1

1

在打包使用依赖本机 (jni) 库的 SDK 的 ANE 时,您需要确保它们也包含在您的 ANE 包中。这些必须放在libs适当的架构目录(armeabi等)的目录中。

如果处理一个aar文件,那么您可以简单地检查它是否包含一个jni目录并将其内容复制到libs您的 ANE 平台实现中的目录中。

您应该最终得到以下结构:

[ANDROID_PLATFORM]/
    your_ane_implementation.jar
    your_ane_res/
    libs/
        armeabi/
            libXXXXX.so
        armeabi-v7a/
            libXXXXX.so    
        ...           
于 2018-04-20T11:07:47.390 回答