LaoMengFlutter / flutter-do

包含350多个组件用法、组件继承关系图、40多个 loading 组件,App升级、验证码、弹幕、音乐字幕 4个插件,一个小而全完整的App项目。
http://laomengit.com/
Apache License 2.0
2.64k stars 542 forks source link

在线更新apk报错 #2

Closed limhGeek closed 4 years ago

limhGeek commented 4 years ago

在线下载apk的时候报错 ==========日志=============== E/flutter (22658): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method getApkDownloadPath on channel flutter_app_upgrade) E/flutter (22658): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:319:7) E/flutter (22658): E/flutter (22658): #1 FlutterUpgrade.apkDownloadPath (package:flutter_app_upgrade/src/flutter_upgrade.dart:24:27) E/flutter (22658): #2 _SimpleAppUpgradeWidget._clickOk (package:flutter_app_upgrade/src/simple_app_upgrade.dart:303:40) E/flutter (22658): #3 _SimpleAppUpgradeWidget._buildOkActionButton. (package:flutter_app_upgrade/src/simple_app_upgrade.dart:269:11) E/flutter (22658): #4 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14) E/flutter (22658): #5 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:789:36) E/flutter (22658): #6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) E/flutter (22658): #7 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11) E/flutter (22658): #8 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5) E/flutter (22658): #9 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7) E/flutter (22658): #10 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9) E/flutter (22658): #11 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12) E/flutter (22658): #12 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:117:9) E/flutter (22658): #13 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8) E/flutter (22658): #14 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18) E/flutter (22658): #15 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7) E/flutter (22658): #16 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19) E/flutter (22658): #17 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22) E/flutter (22658): #18 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7) E/flutter (22658): #19 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7) E/flutter (22658): #20 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7) E/flutter (22658): #21 _rootRunUnary (dart:async/zone.dart:1138:13) E/flutter (22658): #22 _CustomZone.runUnary (dart:async/zone.dart:1031:19) E/flutter (22658): #23 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7) E/flutter (22658): #24 _invoke1 (dart:ui/hooks.dart:273:10) E/flutter (22658): #25 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5) E/flutter (22658): W/System (22658): Ignoring header moid because its value was null. W/System (22658): Ignoring header moid because its value was null.

LaoMengFlutter commented 4 years ago

你是pub引入的吗?还是源代码?从日志看是缺少了getApkDownloadPath方法,是不是修改过源代码?可以clean下,然后重新引入最新版本试试

limhGeek commented 4 years ago

pub引入的,最后FlutterUpgrade中改成下面这样就好了: static const MethodChannel _channel = const MethodChannel('flutter_upgrade');