Closed x1245350223 closed 5 years ago
{"ptid":"12123-13230","data":"401
安卓9及以上的版本运行该项目闪退,安卓4.4.2可以正常运行
Your token is not valid.的问题已解决,在项目\example\android\app\src\main\java\com\example\rongcloud_im_plugin_example\MainActivity.java文件中写死了appkey
安卓9及以上的版本运行该项目闪退 可否提供一下必要的 log ?这边用 Android 9 华为荣耀 8 是可以正常运行的 Android 的 log 最好用 Android studio Logcat 的 log
使用Android studio编译运行不会闪退,但是语音出现异常: /com.example.rongcloud_im_plugin_example E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, start failed., null)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
<asynchronous suspension>
#2 AudioRecorder.start (package:audio_recorder/audio_recorder.dart:44:10)
<asynchronous suspension>
#3 MediaUtil.startRecordAudio (package:rongcloud_im_plugin_example/im/util/media_util.dart:65:25)
<asynchronous suspension>
#4 _BottomInputBarState._onVoiceGesLongPress (package:rongcloud_im_plugin_example/im/pages/item/bottom_input_bar.dart:86:24)
#5 _BottomInputBarState._getMainInputField.<anonymous closure> (package:rongcloud_im_plugin_example/im/pages/item/bottom_input_bar.dart:119:13)
#6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#7 LongPressGestureRecognizer._checkLongPressStart (package:flutter/src/gestures/long_press.dart:279:7)
#8 LongPressGestureRecognizer.didExceedDeadline (package:flutter/src/gestures/long_press.dart:240:5)
#9 PrimaryPointerGestureRecognizer.didExceedDeadlineWithEvent (package:flutter/src/gestures/recognizer.dart:481:5)
#10 PrimaryPointerGestureRecognizer.addAllowedPointer.<anonymous closure> (package:flutter/src/gestures/recognizer.dart:434:40)
#11 _rootRun (dart:async/zone.dart:1120:38)
#12 _CustomZone.run (dart:async/zone.dart:1021:19)
#13 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#14 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#15 _rootRun (dart:async/zone.dart:1124:13)
#16 _CustomZone.run (dart:async/zone.dart:1021:19)
#17 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#18 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:21:15)
#19 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)
#20 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
#21 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
语音异常也只会出现在高版本的android中
高版本 Android 录音异常的原因可能有三个,需要你那边自行排查
1.使用的 audio_recorder ,是否按照官方仓库的文档做了相应的配置,比如在 Manifest 中声明权限?参加 https://pub.dev/packages/audio_recorder 2.高版本 Android 系统的权限需要手动申请,是否使用了 permission_handler 提前申请权限? 参见 https://pub.dev/packages/permission_handler 3.看 log 使用的是我们源码项目,但是最新版本的代码,上面提到的两点都是处理过的,不知道是否是本地跑的是比较旧的源码?可否更新一下试试?
高版本 Android 录音异常的原因可能有三个,需要你那边自行排查
1.使用的 audio_recorder ,是否按照官方仓库的文档做了相应的配置,比如在 Manifest 中声明权限?参加 https://pub.dev/packages/audio_recorder 2.高版本 Android 系统的权限需要手动申请,是否使用了 permission_handler 提前申请权限? 参见 https://pub.dev/packages/permission_handler 3.看 log 使用的是我们源码项目,但是最新版本的代码,上面提到的两点都是处理过的,不知道是否是本地跑的是比较旧的源码?可否更新一下试试?
2.进入会话详情页面时,已经提示是否运行APP进行录制等相关提示,并且同意授权 3.commit 版本号为:f2c213552c105e953391ba3988985ba1746bf715
使用Android studio编译运行代码,高、低版本都能打开,但是录音都出现了报错的情况(与上述错误一致),而使用vs code编译运行代码,高版本闪退,底版本所有功能都正常。
使用Android studio编译运行代码,高、低版本都能打开,但是录音都出现了报错的情况(与上述错误一致),而使用vs code编译运行代码,高版本闪退,底版本所有功能都正常。
错误不一致: [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Exception: Exception: Player is already playing.
#1 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#2 _rootRunUnary (dart:async/zone.dart:1132:38)
#3 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#4 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#5 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#6 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#7 Future._complete (dart:async/future_impl.dart:473:7)
#8 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)
#10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
#11 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart)
#12 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#13 _rootRunUnary (dart:async/zone.dart:1132:38)
#14 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#15 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#16 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#17 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#18 Future._completeWithValue (dart:async/future_impl.dart:483:5)
#19 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7)
#20 _rootRun (dart:async/zone.dart:1124:13)
#21 _CustomZone.run (dart:async/zone.dart:1021:19)
#22 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#23 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#24 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
全部问题已解决,为测试机本身系统问题!!!!!!!!!!!!!
把appKey换成自己的,token也换成自己生成的,后台设置token永久