Android 6.0 华为手机 1to1语音报错

运行在手机上后能看见界面,但是日志是
03-24 10:17:55.657 30987-30987/? I/art: Late-enabling -Xcheck:jni
03-24 10:17:55.748 30987-31003/io.agora.tutorials1v1acall E/HAL: load: id=gralloc != hmi->id=gralloc
03-24 10:17:55.818 30987-30987/io.agora.tutorials1v1acall I/HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl
03-24 10:17:55.840 30987-30987/io.agora.tutorials1v1acall W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
03-24 10:17:55.892 30987-30987/io.agora.tutorials1v1acall I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>
03-24 10:17:55.893 30987-30987/io.agora.tutorials1v1acall I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>
03-24 10:17:55.973 30987-30987/io.agora.tutorials1v1acall I/VoiceChatViewActivity: checkSelfPermission android.permission.RECORD_AUDIO 22
03-24 10:17:56.079 30987-31036/io.agora.tutorials1v1acall E/HAL: load: id=gralloc != hmi->id=gralloc
03-24 10:17:56.079 30987-31036/io.agora.tutorials1v1acall I/OpenGLRenderer: Initialized EGL, version 1.4
03-24 10:19:28.025 30987-30987/io.agora.tutorials1v1acall I/VoiceChatViewActivity: onRequestPermissionsResult 0 22
03-24 10:19:28.209 30987-31396/io.agora.tutorials1v1acall E/WifiManager: WifiServiceMessenger == null
03-24 10:19:28.238 30987-30987/io.agora.tutorials1v1acall I/AudioManager: setSpeakerphoneOn on:false
03-24 10:19:28.239 30987-30987/io.agora.tutorials1v1acall I/AudioManager: setSpeakerphoneOn on:false

不清楚是什么原因,求解答

但是我两台设备1to1语音没有声音啊,库我都加了


应该是没有给录音权限导致的,请添加对应权限:

<uses-permission android:name="android.permission.RECORD_AUDIO" />

详情请参考:
https://docs.agora.io/cn/Interactive%20Broadcast/start_live_android?platform=Android

我添加了权限后还是不行。以下是同一个工程运行在Android 10的手机上的日志
2020-03-24 11:08:52.960 20345-20345/io.agora.tutorials1v1acall I/torials1v1acal: Late-enabling -Xcheck:jni
2020-03-24 11:08:52.982 20345-20345/io.agora.tutorials1v1acall E/torials1v1acal: Unknown bits set in runtime_flags: 0x8000
2020-03-24 11:08:53.235 20345-20345/io.agora.tutorials1v1acall I/Perf: Connecting to perf service.
2020-03-24 11:08:53.249 20345-20345/io.agora.tutorials1v1acall I/FeatureParser: can’t find perseus.xml in assets/device_features/,it may be in /system/etc/device_features
2020-03-24 11:08:53.252 20345-20345/io.agora.tutorials1v1acall W/torials1v1acall: type=1400 audit(0.0:187406): avc: denied { read } for name=“u:object_r:vendor_displayfeature_prop:s0” dev=“tmpfs” ino=17230 scontext=u:r:untrusted_app_27:s0:c235,c257,c512,c768 tcontext=u:object_r:vendor_displayfeature_prop:s0 tclass=file permissive=0
2020-03-24 11:08:53.262 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “ro.vendor.df.effect.conflict”
2020-03-24 11:08:53.274 20345-20415/io.agora.tutorials1v1acall E/Perf: Fail to get file list io.agora.tutorials1v1acall
2020-03-24 11:08:53.274 20345-20415/io.agora.tutorials1v1acall E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2020-03-24 11:08:53.274 20345-20415/io.agora.tutorials1v1acall E/Perf: Fail to get file list io.agora.tutorials1v1acall
2020-03-24 11:08:53.274 20345-20415/io.agora.tutorials1v1acall E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2020-03-24 11:08:53.363 20345-20422/io.agora.tutorials1v1acall I/torials1v1acal: The ClassLoaderContext is a special shared library.
2020-03-24 11:08:53.370 20345-20422/io.agora.tutorials1v1acall I/torials1v1acal: The ClassLoaderContext is a special shared library.
2020-03-24 11:08:53.352 20345-20345/io.agora.tutorials1v1acall W/Binder:intercep: type=1400 audit(0.0:187407): avc: denied { getattr } for path="/data/data/com.miui.contentcatcher" dev=“sda22” ino=11272245 scontext=u:r:untrusted_app_27:s0:c235,c257,c512,c768 tcontext=u:object_r:system_app_data_file:s0 tclass=dir permissive=0
2020-03-24 11:08:53.379 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/Token;->(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V (greylist, linking, allowed)
2020-03-24 11:08:53.380 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/InterceptorProxy;->getWorkThread()Landroid/os/HandlerThread; (greylist, linking, allowed)
2020-03-24 11:08:53.380 20345-20422/io.agora.tutorials1v1acall D/ViewContentFactory: initViewContentFetcherClass
2020-03-24 11:08:53.380 20345-20422/io.agora.tutorials1v1acall D/ViewContentFactory: getInterceptorPackageInfo
2020-03-24 11:08:53.380 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Landroid/app/AppGlobals;->getInitialApplication()Landroid/app/Application; (greylist, linking, allowed)
2020-03-24 11:08:53.381 20345-20422/io.agora.tutorials1v1acall D/ViewContentFactory: getInitialApplication took 0ms
2020-03-24 11:08:53.381 20345-20422/io.agora.tutorials1v1acall D/ViewContentFactory: packageInfo.packageName: com.miui.catcherpatch
2020-03-24 11:08:53.395 20345-20345/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
2020-03-24 11:08:53.396 20345-20422/io.agora.tutorials1v1acall D/ViewContentFactory: initViewContentFetcherClass took 16ms
2020-03-24 11:08:53.397 20345-20422/io.agora.tutorials1v1acall I/ContentCatcher: ViewContentFetcher : ViewContentFetcher
2020-03-24 11:08:53.397 20345-20345/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2020-03-24 11:08:53.398 20345-20422/io.agora.tutorials1v1acall D/ViewContentFactory: createInterceptor took 19ms
2020-03-24 11:08:53.399 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/ContentCatcherManager;->getInstance()Lmiui/contentcatcher/sdk/ContentCatcherManager; (greylist, linking, allowed)
2020-03-24 11:08:53.399 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/ContentCatcherManager;->registerContentInjector(Lmiui/contentcatcher/sdk/Token;Lmiui/contentcatcher/sdk/injector/IContentDecorateCallback;)V (greylist, linking, allowed)
2020-03-24 11:08:53.401 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/ContentCatcherManager;->getPageConfig(Lmiui/contentcatcher/sdk/Token;)Lmiui/contentcatcher/sdk/data/PageConfig; (greylist, linking, allowed)
2020-03-24 11:08:53.407 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/data/PageConfig;->getFeatures()Ljava/util/ArrayList; (greylist, linking, allowed)
2020-03-24 11:08:53.407 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/data/PageConfig;->getCatchers()Ljava/util/ArrayList; (greylist, linking, allowed)
2020-03-24 11:08:53.407 20345-20422/io.agora.tutorials1v1acall I/ContentCatcher: Interceptor : Catcher list invalid for io.agora.tutorials1v1acall@io.agora.tutorials1v1acall.VoiceChatViewActivity@215980416
2020-03-24 11:08:53.407 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden field Lmiui/contentcatcher/sdk/data/FeatureInfo;->name:Ljava/lang/String; (greylist, linking, allowed)
2020-03-24 11:08:53.407 20345-20422/io.agora.tutorials1v1acall I/ContentCatcher: Interceptor : Get featureInfo from config pick_mode
2020-03-24 11:08:53.407 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden field Lmiui/contentcatcher/sdk/data/FeatureInfo;->enable:Z (greylist, linking, allowed)
2020-03-24 11:08:53.407 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/data/FeatureInfo;->getCatcherNameList()Ljava/util/List; (greylist, linking, allowed)
2020-03-24 11:08:53.408 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden field Lmiui/contentcatcher/sdk/data/FeatureInfo;->target:Ljava/lang/String; (greylist, linking, allowed)
2020-03-24 11:08:53.408 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden field Lmiui/contentcatcher/sdk/data/FeatureInfo;->jobTag:Ljava/lang/String; (greylist, linking, allowed)
2020-03-24 11:08:53.408 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden field Lmiui/contentcatcher/sdk/data/FeatureInfo;->mParams:Ljava/util/HashMap; (greylist, linking, allowed)
2020-03-24 11:08:53.408 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lcom/miui/internal/viewcontentfetcher/IViewContentFetcher;->createFetcher(Lmiui/contentcatcher/sdk/Token;Ljava/util/Map;)V (greylist, linking, allowed)
2020-03-24 11:08:53.408 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/Token;->getPkgName()Ljava/lang/String; (greylist, linking, allowed)
2020-03-24 11:08:53.408 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/Token;->getVersionCode()I (greylist, linking, allowed)
2020-03-24 11:08:53.408 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/WebViewDetector;->getInstance()Lmiui/contentcatcher/sdk/WebViewDetector; (greylist, linking, allowed)
2020-03-24 11:08:53.409 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/WebViewDetector;->()V (greylist, linking, allowed)
2020-03-24 11:08:53.409 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/WebViewDetector;->setCustomDetector(Lmiui/contentcatcher/sdk/WebViewDetector;)V (greylist, linking, allowed)
2020-03-24 11:08:53.424 20345-20345/io.agora.tutorials1v1acall I/VoiceChatViewActivity: checkSelfPermission android.permission.RECORD_AUDIO 22
2020-03-24 11:08:53.451 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/WebViewDetector;->setActiveCallback(Lmiui/contentcatcher/sdk/WebViewDetector$Callback;)V (greylist, linking, allowed)
2020-03-24 11:08:53.469 20345-20345/io.agora.tutorials1v1acall W/Looper: Slow Looper main: Activity io.agora.tutorials1v1acall/.VoiceChatViewActivity is 392ms late (wall=0ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.TopResumedActivityChangeItem] }) because of 3 msg, msg 2 took 190ms (seq=2 running=146ms runnable=28ms late=22ms h=android.app.ActivityThread$H w=110), msg 3 took 197ms (seq=3 running=119ms runnable=19ms late=196ms h=android.app.ActivityThread$H w=159)
2020-03-24 11:08:53.470 20345-20345/io.agora.tutorials1v1acall W/ActivityThread: SCHED: io.agora.tutorials1v1acall/.VoiceChatViewActivity [91, r=11ms, a=1ms, w=19ms]
2020-03-24 11:08:53.500 20345-20416/io.agora.tutorials1v1acall I/AdrenoGLES: QUALCOMM build : 775f2c1, I0e419467bc
Build Date : 12/25/19
OpenGL ES Shader Compiler Version: EV031.27.05.01
Local Branch :
Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.8.3.R1.10.00.00.520.058
Remote Branch : NONE
Reconstruct Branch : NOTHING
2020-03-24 11:08:53.501 20345-20416/io.agora.tutorials1v1acall I/AdrenoGLES: Build Config : S P 8.0.11 AArch64
2020-03-24 11:08:53.503 20345-20416/io.agora.tutorials1v1acall I/AdrenoGLES: PFP: 0x016ee187, ME: 0x00000000
2020-03-24 11:08:53.506 20345-20416/io.agora.tutorials1v1acall W/AdrenoUtils: <ReadGpuID_from_sysfs:194>: Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model
2020-03-24 11:08:53.506 20345-20416/io.agora.tutorials1v1acall W/AdrenoUtils: ReadGpuID:218: Failed to read chip ID from gpu_model. Fallback to use the GSL path
2020-03-24 11:08:53.529 20345-20416/io.agora.tutorials1v1acall W/Gralloc3: mapper 3.x is not supported
2020-03-24 11:08:55.587 20345-20345/io.agora.tutorials1v1acall I/VoiceChatViewActivity: onRequestPermissionsResult 0 22
2020-03-24 11:08:55.651 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.665 20345-20345/io.agora.tutorials1v1acall D/BluetoothHeadset: Binding service…
2020-03-24 11:08:55.668 20345-20345/io.agora.tutorials1v1acall D/agora-jni: android bridge create done…
2020-03-24 11:08:55.676 20345-20517/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns1”
2020-03-24 11:08:55.676 20345-20517/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns2”
2020-03-24 11:08:55.676 20345-20517/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns3”
2020-03-24 11:08:55.676 20345-20517/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns4”
2020-03-24 11:08:55.686 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.686 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.686 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.687 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In setSpeakerphoneOn(), on: false, calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.687 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In setSpeakerphoneOn(), on: false, calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.688 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.688 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.689 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.689 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.690 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.691 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.691 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.691 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.692 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.692 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.696 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns1”
2020-03-24 11:08:55.696 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns2”
2020-03-24 11:08:55.696 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns3”
2020-03-24 11:08:55.696 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns4”
2020-03-24 11:08:55.699 20345-20345/io.agora.tutorials1v1acall W/Activity: Slow Operation: Activity io.agora.tutorials1v1acall/.VoiceChatViewActivity onActivityResult took 111ms
2020-03-24 11:08:55.705 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns1”
2020-03-24 11:08:55.705 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns2”
2020-03-24 11:08:55.705 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns3”
2020-03-24 11:08:55.705 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns4”
2020-03-24 11:08:55.707 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.708 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.709 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.709 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.710 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.710 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.711 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.711 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:08:55.767 20345-20528/io.agora.tutorials1v1acall D/BluetoothHeadset: Proxy object connected
2020-03-24 11:09:01.245 20345-20410/io.agora.tutorials1v1acall I/torials1v1acal: ProcessProfilingInfo new_methods=461 is saved saved_to_disk=1 resolve_classes_delay=8000
2020-03-24 11:09:29.387 20345-20345/io.agora.tutorials1v1acall W/ActivityThread: SCHED: io.agora.tutorials1v1acall/.VoiceChatViewActivity [84, r=824ms, a=156ms, w=33688ms]
2020-03-24 11:09:29.742 20345-20422/io.agora.tutorials1v1acall W/torials1v1acal: Accessing hidden method Lmiui/contentcatcher/sdk/ContentCatcherManager;->unregisterContentInjector(Lmiui/contentcatcher/sdk/Token;)V (greylist, linking, allowed)
2020-03-24 11:09:29.742 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.503 20345-20398/io.agora.tutorials1v1acall D/BluetoothHeadset: Proxy object disconnected
2020-03-24 11:09:30.503 20345-20345/io.agora.tutorials1v1acall D/agora-jni: android bridge destroy done…
2020-03-24 11:09:30.507 20345-20345/io.agora.tutorials1v1acall W/Activity: Slow Operation: Activity io.agora.tutorials1v1acall/.VoiceChatViewActivity onDestroy took 765ms
2020-03-24 11:09:30.511 20345-20345/io.agora.tutorials1v1acall I/Choreographer: Skipped 45 frames! The application may be doing too much work on its main thread.
2020-03-24 11:09:30.511 20345-20345/io.agora.tutorials1v1acall W/Looper: Slow Looper main: doFrame is 766ms late because of 3 msg, msg 1 took 773ms (seq=63 running=11ms runnable=1ms late=24ms h=android.app.ActivityThread$H w=159)
2020-03-24 11:09:30.511 20345-20345/io.agora.tutorials1v1acall W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@a383a5b
2020-03-24 11:09:30.522 20345-20422/io.agora.tutorials1v1acall D/ViewContentFactory: initViewContentFetcherClass
2020-03-24 11:09:30.522 20345-20422/io.agora.tutorials1v1acall I/ContentCatcher: ViewContentFetcher : ViewContentFetcher
2020-03-24 11:09:30.522 20345-20422/io.agora.tutorials1v1acall D/ViewContentFactory: createInterceptor took 0ms
2020-03-24 11:09:30.523 20345-20422/io.agora.tutorials1v1acall I/ContentCatcher: Interceptor : Catcher list invalid for io.agora.tutorials1v1acall@io.agora.tutorials1v1acall.VoiceChatViewActivity@152748792
2020-03-24 11:09:30.523 20345-20422/io.agora.tutorials1v1acall I/ContentCatcher: Interceptor : Get featureInfo from config pick_mode
2020-03-24 11:09:30.535 20345-20345/io.agora.tutorials1v1acall I/VoiceChatViewActivity: checkSelfPermission android.permission.RECORD_AUDIO 22
2020-03-24 11:09:30.565 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.566 20345-20345/io.agora.tutorials1v1acall D/BluetoothHeadset: Binding service…
2020-03-24 11:09:30.569 20345-20345/io.agora.tutorials1v1acall D/agora-jni: android bridge create done…
2020-03-24 11:09:30.574 20345-20607/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns1”
2020-03-24 11:09:30.574 20345-20607/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns2”
2020-03-24 11:09:30.574 20345-20607/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns3”
2020-03-24 11:09:30.574 20345-20607/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns4”
2020-03-24 11:09:30.582 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.582 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.583 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.583 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.584 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.584 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.585 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In setSpeakerphoneOn(), on: false, calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.586 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In setSpeakerphoneOn(), on: false, calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.586 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.587 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.588 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.588 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.589 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.590 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.590 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.591 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.591 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.592 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.598 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns1”
2020-03-24 11:09:30.598 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns2”
2020-03-24 11:09:30.598 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns3”
2020-03-24 11:09:30.598 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns4”
2020-03-24 11:09:30.616 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns1”
2020-03-24 11:09:30.616 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns2”
2020-03-24 11:09:30.616 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns3”
2020-03-24 11:09:30.616 20345-20345/io.agora.tutorials1v1acall E/libc: Access denied finding property “net.dns4”
2020-03-24 11:09:30.636 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.636 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.637 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.637 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.640 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.640 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.641 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isSpeakerphoneOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.641 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:30.666 20345-20398/io.agora.tutorials1v1acall D/BluetoothHeadset: Proxy object connected
2020-03-24 11:09:31.469 20345-20345/io.agora.tutorials1v1acall W/ActivityThread: SCHED: io.agora.tutorials1v1acall/.VoiceChatViewActivity [88, r=38ms, a=5ms, w=863ms]
2020-03-24 11:09:31.797 20345-20345/io.agora.tutorials1v1acall I/AudioManager: In isBluetoothScoOn(), calling application: io.agora.tutorials1v1acall
2020-03-24 11:09:32.457 20345-20398/io.agora.tutorials1v1acall D/BluetoothHeadset: Proxy object disconnected
2020-03-24 11:09:32.458 20345-20345/io.agora.tutorials1v1acall D/agora-jni: android bridge destroy done…
2020-03-24 11:09:32.462 20345-20345/io.agora.tutorials1v1acall W/Activity: Slow Operation: Activity io.agora.tutorials1v1acall/.VoiceChatViewActivity onDestroy took 665ms
2020-03-24 11:09:32.468 20345-20345/io.agora.tutorials1v1acall I/Choreographer: Skipped 39 frames! The application may be doing too much work on its main thread.
2020-03-24 11:09:32.468 20345-20345/io.agora.tutorials1v1acall W/Looper: Slow Looper main: doFrame is 665ms late because of 3 msg, msg 1 took 672ms (seq=106 running=14ms runnable=1ms late=24ms h=android.app.ActivityThread$H w=159)

日志跟刚刚的都不一样

给一下 SDK log 吧, Android: /sdcard/{App 的包名}/agorasdk.log
另外看下直接跑 Demo 有没有问题:
https://download.agora.io/sdk/release/Agora_Native_SDK_for_Android_v3_0_0_VOICE.zip?_ga=2.140855602.1686005612.1584843232-1583961819.1580439641
如果 Demo 没有问题,请检查集成代码逻辑。

我跑的就是demo。。。

额,给 sdk log 来看下?

agorasdk.zip (9.3 KB)


加入频道失败了啊,原因是鉴权失败。
请检查 你的项目是否有启用 App 证书?如果启用了,那么必须使用动态密钥鉴权方式,即 join 时需要传入 Token。详情请参考校验用户权限文档:
https://docs.agora.io/cn/Agora%20Platform/token?platform=All%20Platforms

关于如何生成 Token,请参考:
RTC Token:https://docs.agora.io/cn/Video/token_server_cpp?platform=CPP
RTM Token:https://docs.agora.io/cn/Real-time-Messaging/rtm_token?platform=All%20Platforms

以下是生成 Token 的一些注意事项:
1、joinChannel 时所传的 uid、channelName 参数,需要和生成 token 时传的 uid、channelName 参数保持一致(参数类型和值都需要相同)。
2、确保时间戳参数是有效的、没有过期的。
3、如果在生成 Token 时选择了校验 uid,那么需要分别为不同 uid 的用户生成与其对应的 Token。(同一个频道内 uid 具有唯一性,为不同用户设置相同 uid 会导致互踢)

若你目前还在集成测试阶段,我们建议可以新建一个不启用 App 证书的项目,这样使用 App ID 鉴权方式即可。当产品需要上线时,再于正式生产环境下使用 Token。

我启用了app证书,添加的是输入频道名称之后生成的临时token。我把临时token与appID写在了app\src\main\res\values\strings.xml里面,但是还是不行

Demo 里面,调用 joinChannel API 时传的 channelName 参数,有没有修改为生成临时 Token 时设置的频道号?
加入频道时传的 channelName 参数,需要和 生成 Token 时的 channelName 参数保持一致。

或者你试试看新建一个不启用 app 证书的账号,就不用传 token 了