Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在Android上集成后一直跑不起来 #23

Open
gaoyong06 opened this issue Apr 6, 2020 · 3 comments
Open

在Android上集成后一直跑不起来 #23

gaoyong06 opened this issue Apr 6, 2020 · 3 comments

Comments

@gaoyong06
Copy link

按照文档的说明在项目里面集成后,
执行后,出现下面的错误,是哪里没有搞对吗?

当前使用的Android手机开发,当前手机上没有安装QQ
flutter:1.12.13+hotfix.9

I/flutter (10259): flutter_plugin_qq_example:MissingPluginException(No implementation found for method isQQInstalled on channel flutter_qq)
I/flutter (10259): flutter_plugin_qq_example:MissingPluginException(No implementation found for method isQQInstalled on channel flutter_qq)
I/flutter (10259): flutter_plugin_qq_example:MissingPluginException(No implementation found for method isQQInstalled on channel flutter_qq)

@gaoyong06
Copy link
Author


FlutterQq.registerQQ('******');
添加至项目的main.dart 中
Widget build(BuildContext context) 方法中
app一启动,就报下面的错:

I/flutter (10259): headers:
E/flutter (10259): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method registerQQ on channel flutter_qq)
E/flutter (10259): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:319:7)
E/flutter (10259):
E/flutter (10259): #1 FlutterQq.registerQQ (package:flutter_qq/flutter_qq.dart:89:20)
E/flutter (10259): #2 Application.build (package:qzone_app/main.dart:60:15)
E/flutter (10259): #3 StatelessElement.build (package:flutter/src/widgets/framework.dart:4291:28)
E/flutter (10259): #4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4223:15)
E/flutter (10259): #5 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
E/flutter (10259): #6 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
E/flutter (10259): #7 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
E/flutter (10259): #8 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
E/flutter (10259): #9 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
E/flutter (10259): #10 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1028:16)
E/flutter (10259): #11 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:999:5)
E/flutter (10259): #12 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:942:17)
E/flutter (10259): #13 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2412:19)
E/flutter (10259): #14 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:941:13)
E/flutter (10259): #15 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:819:7)
E/flutter (10259): #16 WidgetsBinding.scheduleAttachRootWidget. (package:flutter/src/widgets/binding.dart:804:7)
E/flutter (10259): #17 _rootRun (dart:async/zone.dart:1122:38)
E/flutter (10259): #18 _CustomZone.run (dart:async/zone.dart:1023:19)
E/flutter (10259): #19 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
E/flutter (10259): #20 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23)
E/flutter (10259): #21 _rootRun (dart:async/zone.dart:1126:13)
E/flutter (10259): #22 _CustomZone.run (dart:async/zone.dart:1023:19)
E/flutter (10259): #23 _CustomZone.bindCallback. (dart:async/zone.dart:949:23)
E/flutter (10259): #24 Timer._createTimer. (dart:async-patch/timer_patch.dart:23:15)
E/flutter (10259): #25 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:384:19)
E/flutter (10259): #26 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:418:5)
E/flutter (10259): #27 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)

@gaoyong06
Copy link
Author

flutter clean了一下
现在可以跑起来,但是授权登录后,就会闪退
日志里面的一些敏感信息用【*********】代替

/openSDK_LOG.Tencent(12296): onActivityResultData() reqcode = 11101, resultcode = -1, data = null ? false, listener = null ? false
I/openSDK_LOG.UIListenerManager(12296): onActivityResult req=11101 res=-1
E/openSDK_LOG.UIListenerManager(12296): 登录的接口回调不能重新构建,暂时无法提供,先记录下来这种情况是否存在
I/FlutterQqPlugin(12296): {"ret":0,"openid":,"access_token":"","pay_token":"","expires_in":7776000,"pf":"desktop_m_qq-10000144-android-2002-","pfkey":"","msg":"","login_cost":234,"query_authority_cost":-583828199,"authority_cost":0}
I/FlutterQqPlugin(12296): {}
D/AndroidRuntime(12296): Shutting down VM
I/flutter (12296): 登录成功{accessToken: *********, expiresAt: 1594003841508, openid: *********}
E/AndroidRuntime(12296): FATAL EXCEPTION: main
E/AndroidRuntime(12296): Process: cc.qzone, PID: 12296
E/AndroidRuntime(12296): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=11101, result=-1, data=Intent { (has extras) }} to activity {cc.qzone/cc.qzone.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.MethodChannel$Result.success(java.lang.Object)' on a null object reference
E/AndroidRuntime(12296): at android.app.ActivityThread.deliverResults(ActivityThread.java:3608)
E/AndroidRuntime(12296): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3651)
E/AndroidRuntime(12296): at android.app.ActivityThread.access$1400(ActivityThread.java:155)
E/AndroidRuntime(12296): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1377)
E/AndroidRuntime(12296): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(12296): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(12296): at android.app.ActivityThread.main(ActivityThread.java:5305)
E/AndroidRuntime(12296): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(12296): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(12296): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:922)
E/AndroidRuntime(12296): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:717)
E/AndroidRuntime(12296): Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.MethodChannel$Result.success(java.lang.Object)' on a null object reference
E/AndroidRuntime(12296): at com.github.marekchen.flutterqq.FlutterQqPlugin$OneListener.onComplete(FlutterQqPlugin.java:203)
E/AndroidRuntime(12296): at com.tencent.connect.common.UIListenerManager.onActivityResult(ProGuard:212)
E/AndroidRuntime(12296): at com.tencent.tauth.Tencent.onActivityResultData(ProGuard:403)
E/AndroidRuntime(12296): at com.github.marekchen.flutterqq.FlutterQqPlugin$OneListener.onActivityResult(FlutterQqPlugin.java:236)
E/AndroidRuntime(12296): at io.flutter.embedding.engine.FlutterEnginePluginRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEnginePluginRegistry.java:634)
E/AndroidRuntime(12296): at io.flutter.embedding.engine.FlutterEnginePluginRegistry.onActivityResult(FlutterEnginePluginRegistry.java:367)
E/AndroidRuntime(12296): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:546)
E/AndroidRuntime(12296): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:594)
E/AndroidRuntime(12296): at android.app.Activity.dispatchActivityResult(Activity.java:6234)
E/AndroidRuntime(12296): at android.app.ActivityThread.deliverResults(ActivityThread.java:3604)
E/AndroidRuntime(12296): ... 10 more
Lost connection to device.

@sunbowen920617
Copy link

我遇到一样的问题,请问你解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants