Skip to content
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

demo运行失败 flutter run --debug --verbose #60

Closed
just-for-you opened this issue Nov 18, 2020 · 3 comments
Closed

demo运行失败 flutter run --debug --verbose #60

just-for-you opened this issue Nov 18, 2020 · 3 comments

Comments

@just-for-you
Copy link

just-for-you commented Nov 18, 2020

[ +2 ms] FAILURE: Build failed with an exception.
[ +1 ms] * Where:
[ +1 ms] Script 'D:\Program Files\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780
[ +1 ms] * What went wrong:
[ +3 ms] Execution failed for task ':app:compileFlutterBuildDebug'.
[ +1 ms] > Process 'command 'D:\Program Files\flutter\bin\flutter.bat'' finished with non-zero exit value 1
[ +2 ms] * Try:
[ +2 ms] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[ +4 ms] * Get more help at https://help.gradle.org
[ +1 ms] BUILD FAILED in 3m 31s
image

@kangwang1988
Copy link
Contributor

请提供有意义的信息
只有一个exit value 1
不能说明为什么错了,错哪里了。

@just-for-you
Copy link
Author

just-for-you commented Nov 18, 2020

[ +2 ms] [ +129 ms] Initializing file store
[ +3 ms] [ +12 ms] Done initializing file store
[+1226 ms] [+1739 ms] kernel_snapshot: Starting due to {InvalidatedReason.inputChanged}
[ +2 ms] [ +15 ms] D:\Program Files\flutter\bin\cache\dart-sdk\bin\dart.exe D:\Program Files\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root D:\Program
Files\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter -Ddart.developer.causal_async_stacks=true -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation
--no-link-platform --packages D:\workspace1\aspectd\example.packages --output-dill D:\workspace1\aspectd\example.dart_tool\flutter_build\c125647ee42b768ffbe33457bf2c9b57\app.dill --depfile
D:\workspace1\aspectd\example.dart_tool\flutter_build\c125647ee42b768ffbe33457bf2c9b57\kernel_snapshot.d package:example/main.dart
[+26698 ms] [+26666 ms] Persisting file store
[ +17 ms] [ +20 ms] Done persisting file store
[ +2 ms] [ +18 ms] "flutter assemble" took 28,714ms.
[ +5 ms] [ +2 ms] Target kernel_snapshot failed: Invalid argument(s): Cannot find executable for D:\Program Files\flutter\bin\cache\dart-sdk\bin\dart.bat.
[ +76 ms] build failed.
[ +13 ms] #0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
[ +3 ms] #1 AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:183:7)
[ +1 ms]
[ +1 ms] #2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:615:18)
[ +5 ms]
[ +2 ms] #3 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:515:33)
[ +2 ms]
[ +2 ms] #4 AppContext.run. (package:flutter_tools/src/base/context.dart:146:29)
[ +1 ms] #5 _rootRun (dart:async/zone.dart:1126:13)
[ +2 ms] #6 _CustomZone.run (dart:async/zone.dart:1023:19)
[ +4 ms] #7 _runZoned (dart:async/zone.dart:1518:10)
[ +2 ms] #8 runZoned (dart:async/zone.dart:1465:12)
[ +1 ms] #9 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
[ +1 ms] #10 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:505:20)
[ +1 ms] #11 CommandRunner.runCommand (package:args/command_runner.dart:197:27)
[ +3 ms] #12 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:413:21)
[ +7 ms]
[ +1 ms] #13 AppContext.run. (package:flutter_tools/src/base/context.dart:146:29)
[ +3 ms] #14 _rootRun (dart:async/zone.dart:1126:13)
[ +1 ms] #15 _CustomZone.run (dart:async/zone.dart:1023:19)
[ +4 ms] #16 _runZoned (dart:async/zone.dart:1518:10)
[ +2 ms] #17 runZoned (dart:async/zone.dart:1465:12)
[ +2 ms] #18 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
[ +3 ms] #19 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:19)
[ +2 ms] #20 CommandRunner.run. (package:args/command_runner.dart:112:25)
[ +1 ms] #21 new Future.sync (dart:async/future.dart:224:31)
[ +7 ms] #22 CommandRunner.run (package:args/command_runner.dart:112:14)
[ +6 ms] #23 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:250:18)
[ +13 ms] #24 run.. (package:flutter_tools/runner.dart:63:22)
[ +5 ms] #25 _rootRun (dart:async/zone.dart:1126:13)
[ +12 ms] #26 _CustomZone.run (dart:async/zone.dart:1023:19)
[ +5 ms] #27 _runZoned (dart:async/zone.dart:1518:10)
[ +11 ms] #28 runZoned (dart:async/zone.dart:1502:12)
[ +6 ms] #29 run. (package:flutter_tools/runner.dart:61:18)
[ +11 ms]
[ +2 ms] #30 AppContext.run. (package:flutter_tools/src/base/context.dart:146:29)
[ +1 ms] #31 _rootRun (dart:async/zone.dart:1126:13)
[ +5 ms] #32 _CustomZone.run (dart:async/zone.dart:1023:19)
[ +3 ms] #33 _runZoned (dart:async/zone.dart:1518:10)
[ +2 ms] #34 runZoned (dart:async/zone.dart:1465:12)
[ +4 ms] #35 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
[ +1 ms] #36 runInContext (package:flutter_tools/src/context_runner.dart:64:24)
[ +2 ms] #37 run (package:flutter_tools/runner.dart:50:10)
[ +5 ms] #38 main (package:flutter_tools/executable.dart:65:9)
[ +1 ms] #39 main (file:///D:/Program%20Files/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
[ +1 ms] #40 _startIsolate. (dart:isolate-patch/isolate_patch.dart:305:32)
[ +5 ms] #41 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
[ +2 ms] > Task :app:compileFlutterBuildDebug FAILED
[ +10 ms] 1 actionable task: 1 executed
[ +5 ms] FAILURE: Build failed with an exception.
[ +4 ms] * Where:
[ +2 ms] Script 'D:\Program Files\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780
[ +5 ms] * What went wrong:
[ +1 ms] Execution failed for task ':app:compileFlutterBuildDebug'.
[ +1 ms] > Process 'command 'D:\Program Files\flutter\bin\flutter.bat'' finished with non-zero exit value 1
[ +16 ms] * Try:
[ +14 ms] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[ +2 ms] * Get more help at https://help.gradle.org
[ +10 ms] BUILD FAILED in 33s
[ +218 ms] Running Gradle task 'assembleDebug'... (completed in 34.1s)
[ +12 ms] "flutter run" took 35,409ms.
Gradle task assembleDebug failed with exit code 1

#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 buildGradleApp (package:flutter_tools/src/android/gradle.dart:387:7)

#2 _AndroidBuilderImpl.buildApk (package:flutter_tools/src/android/android_builder.dart:97:13)
#3 AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:522:28)

#4 FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:450:54)
#5 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:73:64)
#6 _rootRunUnary (dart:async/zone.dart:1134:38)
#7 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#8 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#9 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#10 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#11 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#12 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:32:15)
#13 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:290:13)
#14 ApplicationPackageFactory.getPackageForPlatform (package:flutter_tools/src/application_package.dart)
#15 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:73:64)
#16 _rootRunUnary (dart:async/zone.dart:1134:38)
#17 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#18 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#19 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#20 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#21 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#22 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:32:15)
#23 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:290:13)
#24 AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart)
#25 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:73:64)
#26 _rootRunUnary (dart:async/zone.dart:1134:38)
#27 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#28 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#29 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#30 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#31 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#32 Future._asyncComplete. (dart:async/future_impl.dart:554:7)
#33 _rootRun (dart:async/zone.dart:1126:13)
#34 _CustomZone.run (dart:async/zone.dart:1023:19)
#35 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#36 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23)
#37 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#38 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#39 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#40 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)

备注:我这flutter和aspect分支都是1.12.13,patch内容如下:
packages/flutter_tools/lib/src/aot.dart | 3 +
packages/flutter_tools/lib/src/aspectd.dart | 377 ++++++++++++++++++
.../lib/src/build_system/targets/dart.dart | 6 +
.../lib/src/commands/build_bundle.dart | 6 +
packages/flutter_tools/lib/src/compile.dart | 2 +
5 files changed, 394 insertions(+)

patch经过check成功执行

D:\workspace1\aspectd\example>flutter doctor -v
[√] Flutter (Channel unknown, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.14393], locale zh-CN)
• Flutter version 1.12.13+hotfix.9 at D:\Program Files\flutter
• Framework revision f139b11009 (8 months ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\tiankun01\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: D:\Program Files\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.

[√] Android Studio (version 4.0)
• Android Studio at D:\Program Files\Android Studio1
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (1 available)
• SM G9500 • 988b5c39424d483851 • android-arm64 • Android 8.0.0 (API 26)

• No issues found!

@kangwang1988
Copy link
Contributor

Cannot find executable for D:\Program Files\flutter\bin\cache\dart-sdk\bin\dart.bat.
flutter 环境问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants