简体   繁体   English

Flutter:带有BottomNavigationBar的ArrayIndexOutOfBoundsException

[英]Flutter: ArrayIndexOutOfBoundsException with BottomNavigationBar

I'm following to this tutorial: https://github.com/fablue/building-a-social-network-with-flutter and I completely copied and pasted the "Resume" section, but it stops with these errors. 我正在关注本教程: https : //github.com/fablue/building-a-social-network-with-flutter ,我完全复制并粘贴了“ Resume”部分,但是由于这些错误而停止。

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

flutter doctor: 扑医生:

[√] Flutter (Channel beta, v0.4.4, on Microsoft Windows [Version 10.0.17134.112], locale en-GB)
    • Flutter version 0.4.4 at C:\Program Files\flutter
    • Framework revision f9bb4289e9 (6 weeks ago), 2018-05-11 21:44:54 -0700
    • Engine revision 06afdfe54e
    • Dart version 2.0.0-dev.54.0.flutter-46ab040e58

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\ritar\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

[√] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 24.1.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] Connected devices (1 available)
    • 601SO • CB512BVV00 • android-arm64 • Android 7.0 (API 24)

I'm glad if you can tell me how to make it work. 如果您能告诉我如何使其运作,我感到很高兴。

This package is not maintained anymore and outdated. 该软件包不再维护且已过时。 It was developed for the early flutter and does not use Dart 2. Also the Readme says: 它是为早期抖动而开发的,不使用Dart2。此外,自述文件还指出:

This project tutorial is OUT OF DATE. 该项目教程已过期。 It was created with a very early version of flutter and I am not able to maintain it 它是使用非常早期的Flutter版本创建的,我无法对其进行维护

Here is an issue that describes your problem. 是一个描述您的问题的问题。

Seems this problem is related with /build directory. 似乎此问题与/ build目录有关。 Run: 跑:

flutter clean //removes your /build directory
flutter run

As documented in this issue 本期所记录

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 flutter webview 导航带底部导航栏 - flutter webview navigation with bottomnavigationbar Flutter:在BottomNavigationBar 中使用可扩展文本字段 - Flutter: Using Expandable Textfield with BottomNavigationBar 颤振应用程序中的Bottomnavigationbar项目图标 - Bottomnavigationbar item icon in flutter app 如何在 flutter 中创建自定义 BottomNavigationBar? - How to create a custom BottomNavigationBar in flutter? GetMidleware 在底部导航栏上不起作用 - flutter - GetX - GetMidleware not working on bottomNavigationBar - flutter - GetX 颤振 如何使Fotto中的BottomNavigationBar自定义按钮? - Flutter | How to make custom button of BottomNavigationBar in flutter? 在flutter中使用bottomNavigationBar时如何进行页面转换 - How to make page transition when use bottomNavigationBar in flutter 无法与 BottomNavigationBar 结合显示 Column (Flutter 1.9.1) - Can't display a Column in combination with a BottomNavigationBar (Flutter 1.9.1) 从 Flutter 中的 BottomNavigationBar-sceeen 导航到子屏幕 - Navigation to sub-screen from BottomNavigationBar-sceeen in Flutter 为什么 Google Flutter 中底部导航栏中的类似项目的文本大小不同? - Why is the text size different in similar items inside a bottomNavigationBar in Google Flutter?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM