-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeError: RangeError (index): Invalid value: Only valid value is 0: 1 #17831
Comments
Ditto ... same problem as of 5/23/2018. |
same problem here |
I am using Android Studio and creating a flutter app for my build. I just created a new app, copied my main.dart project file and modified my pubspec.yaml file. I also needed to rerun: c:\myapp>flutter packages get Perhaps trying to rerun "flutter packages get" first in the failing project would be a good attempt to fix the range error. I am new to flutter so please excuse my brute force method to fixing the issue. |
Hey guys, I was able to fix it by going to the projects root directory and running the command
... I was experiencing the issue on iOS. |
I had the same issue and "flutter clean" did it for me too |
flutter clean is working! |
flutter clean did the trick! Thanks bdytx5! |
flutter clean is the way! |
|
Jessus, this error showed in both iOS and Android |
I'm seeing this too. The failing code is this (in final String contents = await fs.file(depfilePath).readAsString();
final String dependencies = contents.split(': ')[1]; The file it's reading is |
I ran into this same problem tonight. +1 for running flutter clean |
It does seem very suspicious that the kernel compiler has emitted a zero-byte depfile (assuming that's what's going on here). I'll land a fix in the fingerprinter; errors there should never be fatal -- at worst they should result in the build being invalidated. Gradle also attempts to parse this file so I suspect we'll need a fix there too. @a-siva @mraleph is the kernel compiler ever expected to emit a 0-byte file? EDIT: actually after poking through this code for unrelated reasons today, @sbaranov and I ran across a bug in how |
The fix is out in #18321. UPDATE: it's landed on |
|
Hey @bdytx5, I have tried the
|
|
|
flutter clean didn't work for me. |
|
flutter clean not work for me too |
@AnandGupta7866 |
Hi guys! I also has the same problem, |
a very simple start-up app, and runs good, but suddenly crash, then can never run again:
Source (main.dart):
Logs
Flutter crash report; please file at https://github.com/flutter/flutter/issues.
command
flutter run -d D98B467B-1756-436B-9DAF-98E915394BA3
exception
RangeError: RangeError (index): Invalid value: Only valid value is 0: 1
flutter doctor
flutter analyze
The text was updated successfully, but these errors were encountered: