Flutter:带有BottomNavigationBar的ArrayIndexOutOfBoundsException

时间:2018-06-24 03:50:32

标签: android flutter

我正在关注本教程: https://github.com/fablue/building-a-social-network-with-flutter 并且我完全复制并粘贴了“恢复”部分,但由于这些错误而停止。

app:layout_constraintBottom_toBottomOf="parent" 

颤抖的医生:

Error reading dependency file C:\Users\ritar\AndroidStudioProjects\practice_google_plus\build\app\intermediates\flutter\debug\snapshot_blob.bin.d: java.lang.ArrayIndexOutOfBoundsException: 1
Error reading dependency file C:\Users\ritar\AndroidStudioProjects\practice_google_plus\build\app\intermediates\flutter\debug\snapshot_blob.bin.d: java.lang.ArrayIndexOutOfBoundsException: 1
Error reading dependency file C:\Users\ritar\AndroidStudioProjects\practice_google_plus\build\app\intermediates\flutter\debug\snapshot_blob.bin.d: java.lang.ArrayIndexOutOfBoundsException: 1

Oops; flutter has exited unexpectedly.
Crash report written to C:\Users\ritar\AndroidStudioProjects\practice_google_plus\flutter_08.log;
please let us know at https://github.com/flutter/flutter/issues.

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Program Files\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 435

* What went wrong:
Execution failed for task ':app:flutterBuildDebug'.
> Process 'command 'C:\Program Files\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
Finished with error: Gradle build failed: 1

很高兴您能告诉我如何使它工作。

2 个答案:

答案 0 :(得分:0)

此软件包不再维护且已过时。它是为早期颤动而开发的,并且不使用Dart2。此外,自述文件还说:

  

此项目教程已过期。它是使用非常早期的flutter版本创建的,我无法对其进行维护

Here是描述您的问题的问题。

答案 1 :(得分:0)

似乎此问题与/ build目录有关。运行:

flutter clean //removes your /build directory
flutter run

this issue

中所述