简体   繁体   English

opentok找不到本机Lcom / opentok / android / BaseAudioDevice的实现

[英]opentok No implementation found for native Lcom/opentok/android/BaseAudioDevice

When i call "new Session", get a No implementation found error. 当我调用“新会话”时,出现“找不到实现”错误。

The version of OpenTok Android SDK are: opentok-android-sdk-2.4.0 running over a Wifi network, using a Galaxy nexus 7 device. OpenTok Android SDK的版本为:使用Galaxy nexus 7设备在Wifi网络上运行的opentok-android-sdk-2.4.0

I was using version 2.2 libraries of Opentok for Android, but When updating opentok.jar to 2.4, after adding new handlers required for the build to succeed and to cover all of our old functionality, started having this run time crash 我使用的是适用于Android的Opentok版本2.2库,但是在将opentok.jar更新为2.4时,在添加了构建成功并涵盖我们所有旧功能所需的新处理程序之后,开始出现运行时崩溃

Do you have the LogCat or Screenshots? 您是否有LogCat或屏幕截图?

03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/dalvikvm﹕ No implementation found for native Lcom/opentok/android/BaseAudioDevice;.initNative:()Z 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ java.lang.UnsatisfiedLinkError: Native method not found: com.opentok.android.BaseAudioDevice.initNative:()Z 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at com.opentok.android.BaseAudioDevice.initNative(Native Method) 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at com.opentok.android.AudioDeviceManager.initializeDefaultDevice(AudioDeviceManager.java:60) 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at com.opentok.android.Session.(Session.java:430) 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at net.holisticlabs.digitalbutler.appfwk.internal.xmpp.AppFwkCollaborator.connectSession(AppFwkCollaborator.java:815) 03-18 14:14 03月18日14:14:35.781 12999-13041 / net.holisticlabs.digitalbutler W / dalvikvm:找不到本地Lcom / opentok / android / BaseAudioDevice; .initNative :()Z的实现03-18 14:14:35.781 12999- 13041 / net.holisticlabs.digitalbutler W / System.err:java.lang.UnsatisfiedLinkError:未找到本机方法:com.opentok.android.BaseAudioDevice.initNative :()Z 03-18 14:14:35.781 12999-13041 / net com.opentok.android.BaseAudioDevice.initNative(本机方法)的.holisticlabs.digitalbutler W / System.err:,com处的03-18 14:14:35.781 12999-13041 / net.holisticlabs.digitalbutler W / System.err ﹕。 opentok.android.AudioDeviceManager.initializeDefaultDevice(AudioDeviceManager.java:60)03-18 14:14:35.781 12999-13041 / net.holisticlabs.digitalbutler W / System.err:at com.opentok.android.Session。(Session.java :430)03-18 14:14:35.781 12999-13041 / net.holisticlabs.digitalbutler W / System.err:位于net.holisticlabs.digitalbutler.appfwk.internal.xmpp.AppFwkCollaborator.connectSession(AppFwkCollaborator.java:815)03 -18 14:14 :35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at net.holisticlabs.digitalbutler.agent.MobileAgent.connectCall(MobileAgent.java:666) 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:24) 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:102) 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at android.os.Looper.loop(Looper.java:136) 03-18 14:14:35.781 12999-13041/net.holisticlabs.digitalbutler W/System.err﹕ at android.os.HandlerThread.run(HandlerThread.java:61) :35.781 12999-13041 / net.holisticlabs.digitalbutler W / System.err:位于net.holisticlabs.digitalbutler.agent.MobileAgent.connectCall(MobileAgent.java:666)03-18 14:14:35.781 12999-13041 / net。 holisticlabs.digitalbutler W / System.err:位于com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(本机方法)03-18 14:14:35.781 12999-13041 / net.holisticlabs.digitalbutler W / System.err: com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:24)03-18 14:14:35.781 12999-13041 / net.holisticlabs.digitalbutler W / System.err:位于android.os.Handler .dispatchMessage(Handler.java:102)03-18 14:14:35.781 12999-13041 / net.holisticlabs.digitalbutler W / System.err:位于android.os.Looper.loop(Looper.java:136)03-18 14:14:35.781 12999-13041 / net.holisticlabs.digitalbutler W / System.err:位于android.os.HandlerThread.run(HandlerThread.java:61)

What is your code? 你的代码是什么?

publishOnConnect = newpublishOnConnect;
sessionid = sessionID;
waitingForConnect = true;
if(sessionObj != null)
{
    Message msg=new Message();
    if(publisherObj != null) {
         View temp = publisherObj.getView();
         List<Object> list = new ArrayList<Object>();
         list.add("clear");
         list.add(temp);
         msg.obj = list;
         AppFwkMain.collabviewHandler.sendMessage(msg);
         sessionObj.unpublish(publisherObj);
    }
    sessionObj.disconnect();
    connections = 0;
    publisherObj = null;
    sessionObj = null;
}
try {
    sessionObj = new Session(context,ConfigFile.APIKEY,sessionID);
}
catch ( Exception e)
{
    Log.w(LOGTAG,"session creation fail:", e);
}
sessionObj.setSessionListener(this);
sessionObj.setConnectionListener(this);
sessionObj.setStreamPropertiesListener(this);
sessionObj.connect(Token);

You also need to update the libopentok.so (native) files. 您还需要更新libopentok.so(本机)文件。 You can find them in the download within the armeabi and x86 directories. 您可以在armeabi和x86目录的下载文件中找到它们。 Depending on your build tool (ant or gradle) and your IDE (Eclipse or Android Studio) you must place them in the appropriate directories within your project, but you should just be replacing the already existing files. 根据您的构建工具(ant或gradle)和IDE(Eclipse或Android Studio),您必须将它们放置在项目中的适当目录中,但是您应该只替换现有的文件。 Double check that you've uninstalled the old version of the app on the emulator and/or device, and you've completely cleaned your build directory. 仔细检查您是否已在模拟器和/或设备上卸载了旧版本的应用程序,并且已彻底清理了构建目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM