牛轧糖7.0上的FLutter应用程序停止

时间:2018-07-28 05:58:09

标签: android flutter

我正在其中一台设备(棉花糖6.0)上运行Flutter应用程序,但运行正常。 但是,如果我在另一台设备(牛轧糖7.0)上运行相同的应用程序,则会通过以下错误进行操作,并且该应用程序无法启动。

我用谷歌搜索,但没有得到任何结果。

E/FlutterMain(20122): Flutter initialization failed. E/FlutterMain(20122): java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.view.ResourceExtractor.waitForCompletion()' on a null object reference E/FlutterMain(20122): at io.flutter.view.FlutterMain.ensureInitializationComplete(FlutterMain.java:196) E/FlutterMain(20122): at io.flutter.app.FlutterActivityDelegate.onCreate(FlutterActivityDelegate.java:159) E/FlutterMain(20122): at io.flutter.app.FlutterActivity.onCreate(FlutterActivity.java:86) E/FlutterMain(20122): at app.ntext.ntextdev.MainActivity.onCreate(MainActivity.java:10) E/FlutterMain(20122): at android.app.Activity.performCreate(Activity.java:6666) E/FlutterMain(20122): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) E/FlutterMain(20122): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677) E/FlutterMain(20122): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789) E/FlutterMain(20122): at android.app.ActivityThread.-wrap12(ActivityThread.java) E/FlutterMain(20122): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527) E/FlutterMain(20122): at android.os.Handler.dispatchMessage(Handler.java:110) E/FlutterMain(20122): at android.os.Looper.loop(Looper.java:203) E/FlutterMain(20122): at android.app.ActivityThread.main(ActivityThread.java:6251) E/FlutterMain(20122): at java.lang.reflect.Method.invoke(Native Method) E/FlutterMain(20122): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1075) E/FlutterMain(20122): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

谢谢。

1 个答案:

答案 0 :(得分:0)

尝试在终端上运行“ flutter clean”,然后再次运行。还要确保您正在运行最新版本的Flutter或使用“ flutter升级”对其进行升级。