recently encountered the following bug during development with flutter :
during run,
Finished with error: Gradle task assembleDebug failed with exit code 1
at this point if you are in a hurry to pack for someone else, you can scan with flutter clean and then re-run. The first time always succeeds,
then, after the first run, the error will continue.
p>
you can’t just flutter clean all the time and then run, that would be a waste of time, not a long-term solution.
———————————————–
p>
according to the above line of error Google has encountered many similar situations, but the reasons for the error are different, and I did not see the possibility of
is the same reason that I’m in this situation,
———————
but the answer is that running the flutter run-v will give you more detailed information about the error, but still not much use.
the information obtained from the flutter run-v does not locate the cause of the error.
p>
flutter as a new cross-platform solution is really a pitfall, but the problem will always be solved and the project will continue to be done,
————–
then began to think, until the day before yesterday off work or not this situation, yesterday since noon had this problem, so
Can
find clues in git’s commit records?
——————————–
then starts to look through the Git commit record of this period and finds a suspicious
import 'package:inin/features/searchpage/SearchUserPage.dart%20';
Is there an extra %20 after
?
————————
so delete this line, flutter clean, re-run, the problem finally does not appear.
solved the case…
p>
p>
Read More:
- PaddlePaddle:Process finished with exit code -1073741819 (0xC0000005)
- Process finished with exit code 0 error reporting solution
- Quick solution org.gradle.api . tasks.TaskExecutionException : Execution failed for task ‘: app:compileJava ‘
- Xcode:Task failed with exit 1 signal 0 {
- Mobile development: the error of “task failed with exit 1 signal 0 {…”
- Mobile development: prompt ‘Task failed with exit 1 signal 0 {…’ error
- command/usr/bin/codesign failed with exit code 1- code sign error
- Flutter – iOS: Command /bin/sh failed with exit code 255
- About Xcode command phasescriptexecution failed with a nonzero exit code solution
- What about ibtool failed with exit code 255? processing method
- Command CompileSwift failed with a nonzero exit code
- Git did not exit cleanly (exit code 128)
- Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle-6.7.1-b
- [Solved] Android gradle Error: gradle project sync failed. Please fix your project and try again
- GitHub desktop upload file error commit failed – exit code 1 received
- Command PhaseScriptExecution failed with a nonzero exit code
- [solution] MAC: stack error: ` gyp ‘failed with exit code:1
- woeusb Installation failed Exit code 256
- Command /usr/bin/codesign failed with exit code 1
- Command codesign failed with a nonzero exit code or revoke certificate for IOS / Xcode problems