AgoraIO / Voice-Call-for-Mobile-Gaming

42 stars 53 forks source link

游戏语音demo问题 #8

Closed CodingArtisan-cn closed 5 years ago

CodingArtisan-cn commented 5 years ago

我在测试使用声网的demo,我下载了游戏语音tag 里面的2.2.3.20 这个版本,按照提示下载的互动游戏SDK android语音版 v2.2版本,解决一些编译问题后,出现下面这个错误,请问是否为demo的代码没有更新导致? mRtcEngine.setChannelProfile(Constants.CHANNEL_PROFILE_GAME_FREE_MODE); android studio提示 CHANNEL_PROFILE_GAME_FREE_MODE 这个符号找不到,请问这个是怎么回事哈。

zhangtao1104 commented 5 years ago

嗯 , 2.2.3.20 是我们最新的版本,native 版本之前暂时未做适配,现在适配了,你更新下代码,再尝试下是否 OK 了。

CodingArtisan-cn commented 5 years ago

08 11:47:02.771 12693-12731/io.agora.amg.app I/System.out: [Thread-6] DEBUG MyEngineEventHandler$1 onAudioRouteChanged -1 01-08 11:47:02.772 12693-12731/io.agora.amg.app E/AndroidRuntime: FATAL EXCEPTION: Thread-6 Process: io.agora.amg.app, PID: 12693 java.lang.NoSuchMethodError: No virtual method keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView; in class Ljava/util/concurrent/ConcurrentHashMap; or its super classes (declaration of 'java.util.concurrent.ConcurrentHashMap' appears in /system/framework/core-oj.jar) at io.agora.amg.model.MyEngineEventHandler$1.onAudioRouteChanged(MyEngineEventHandler.java:145) at io.agora.rtc.internal.RtcEngineImpl.handleEvent(RtcEngineImpl.java:1485) at io.agora.rtc.internal.RtcEngineImpl.onEvent(RtcEngineImpl.java:1184) 01-08 11:47:02.785 12693-12693/? I/System.out: [main] DEBUG WorkerThread wait for WorkerThread 01-08 11:47:02.786 12693-12693/? I/System.out: [main] DEBUG BaseActivity checkSelfPermission android.permission.WRITE_EXTERNAL_STORAGE 4 01-08 11:47:02.791 12693-12699/? I/zygote64: Do full code cache collection, code=124KB, data=79KB

CodingArtisan-cn commented 5 years ago

我更新编出demo后,出现闪退现象,logcat内容如上,是不是还有什么地方没有完全更新呢。 08 11:47:02.771 12693-12731/io.agora.amg.app I/System.out: [Thread-6] DEBUG MyEngineEventHandler$1 onAudioRouteChanged -1 01-08 11:47:02.772 12693-12731/io.agora.amg.app E/AndroidRuntime: FATAL EXCEPTION: Thread-6 Process: io.agora.amg.app, PID: 12693 java.lang.NoSuchMethodError: No virtual method keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView; in class Ljava/util/concurrent/ConcurrentHashMap; or its super classes (declaration of 'java.util.concurrent.ConcurrentHashMap' appears in /system/framework/core-oj.jar) at io.agora.amg.model.MyEngineEventHandler$1.onAudioRouteChanged(MyEngineEventHandler.java:145) at io.agora.rtc.internal.RtcEngineImpl.handleEvent(RtcEngineImpl.java:1485) at io.agora.rtc.internal.RtcEngineImpl.onEvent(RtcEngineImpl.java:1184) 01-08 11:47:02.785 12693-12693/? I/System.out: [main] DEBUG WorkerThread wait for WorkerThread 01-08 11:47:02.786 12693-12693/? I/System.out: [main] DEBUG BaseActivity checkSelfPermission android.permission.WRITE_EXTERNAL_STORAGE 4 01-08 11:47:02.791 12693-12699/? I/zygote64: Do full code cache collection, code=124KB, data=79KB

zhangtao1104 commented 5 years ago

1: 你这边把 Demo 分支切到 2.2.3.20, 2: 然后下载 Agora.io 官网互动游戏 SDK Android 语音版 v2.2 sdk,将 SDK jar 包放入Hello-Gaming-Agora-Android/app/libs下, 3: so 文件放入 Hello-Gaming-Agora-Android/app/src/main/jniLibs 下。 4: 在strings_config 中,填入你在 Agora 官网注册的 Project 的 appId ,然后运行。

我这边运行都是 OK 的,你这边再check 下看可能哪里有问题。