Flutter软件包不适用于仅条纹插件

时间:2018-09-18 06:31:34

标签: plugins dart flutter stripe-payments flutter-dependencies

我正在尝试添加条纹插件,当我在pubsec.yml中添加文件时,导入文件时出现错误时什么也没发生...我创建了一个新项目并导入了插件,但是其他插件工作文件也发生了同样的事情。 / p>

reference

C:\flutter\bin\flutter.bat --no-color doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.17134.285], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.1)
[√] Android Studio (version 3.1)
[√] Connected devices (1 available)

• No issues found!
Process finished with exit code 0

enter image description here

它会导入,但仍会给出插件缺失错误:

E/flutter ( 4388): [ERROR:flutter/shell/common/shell.cc(181)] Dart Error: Unhandled exception:
E/flutter ( 4388): MissingPluginException(No implementation found for method getCardToken on channel com.mtaliaf.stripeflutter/stripe_flutter)
E/flutter ( 4388): #0      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:278:7)
E/flutter ( 4388): <asynchronous suspension>
E/flutter ( 4388): #1      StripeFlutter.getCardToken (package:stripe_flutter/stripe_flutter.dart:16:41)
E/flutter ( 4388): <asynchronous suspension>
E/flutter ( 4388): #2      _CheckcodeState.initPlatformState (package:ecom_hybrid/ui/check_code.dart:31:39)
E/flutter ( 4388): <asynchronous suspension>
E/flutter ( 4388): #3      _CheckcodeState.initState (package:ecom_hybrid/ui/check_code.dart:22:5)
E/flutter ( 4388): #4      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3763:58)
E/flutter ( 4388): #5      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
E/flutter ( 4388): #6      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
E/flutter ( 4388): #7      Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
E/flutter ( 4388): #8      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
E/flutter ( 4388): #9      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
E/flutter ( 4388): #10     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
E/flutter ( 4388): #11     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
E/flutter ( 4388): #12     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
E/flutter ( 4388): #13     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
E/flutter ( 4388): #14     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
E/flutter ( 4388): #15     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
E/flutter ( 4388): #16     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
E/flutter ( 4388): #17     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
E/flutter ( 4388): #18     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
E/flutter ( 4388): #19     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
E/flutter ( 4388): #20     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
E/flutter ( 4388): #21     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
E/flutter ( 4388): #22     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
E/flutter ( 4388): #23     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
E/flutter ( 4388): #24     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
E/flutter ( 4388): #25     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
E/flutter ( 4388): #26     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
E/flutter ( 4388): #27     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
E/flutter ( 4388): #28     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
E/flutter ( 4388): #29     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
E/flutter ( 4388): #30     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
E/flutter ( 4388): #31     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
E/flutter ( 4388): #32     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
E/flutter ( 4388): #33     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
E/flutter ( 4388): #34     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
E/flutter ( 4388): #35     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
E/flutter ( 4388): #36     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
E/flutter ( 4388): #37     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
E/flutter ( 4388): #38     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
E/flutter ( 4388): #39     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
E/flutter ( 4388): #40     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
E/flutter ( 4388): #41     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
E/flutter ( 4388): #42     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
E/flutter ( 4388): #43     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
E/flutter ( 4388): #44     Comp

1 个答案:

答案 0 :(得分:1)

如果您保存pubsec.yml文件ctrl + s,则代替包get,它将保存而没有任何问题,并且在获取依赖项后,导入错误将删除。