无法编译任何Flutter ptoject(甚至是hello world)。这是在Android Studio,Intellig Idea,终端上发生的。 我试图切换到不同的颤动通道(测试版,稳定版)-并没有帮助。 出现以下错误
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 677
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'cmd'' finished with non-zero exit value -1073741511
这是运行flutter build apk --debug -vv
[ +151 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +245 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 198df796aa80073ef22bdf249e614e2ff33c6895
[ ] executing: [C:\flutter/] git tag --points-at HEAD
[ +221 ms] Exit code 0 from: git tag --points-at HEAD
[ ] 1.23.0-18.1.pre
[ +9 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +214 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/beta
[ ] executing: [C:\flutter/] git ls-remote --get-url origin
[ +214 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +247 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
[ +217 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] beta
[ +192 ms] Generating D:\proj\temp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +58 ms] Running Gradle task 'assembleDebug'...
[ +2 ms] gradle.properties already sets `android.enableR8`
[ +3 ms] Using gradle from D:\proj\temp\android\gradlew.bat.
[ +1 ms] D:\proj\temp\android\gradlew.bat mode: 33279 rwxrwxrwx.
[ +4 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +179 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +1 ms] openjdk version "1.8.0_242-release"
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode)
[ +1 ms] executing: [D:\proj\temp\android/] D:\proj\temp\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-arm,android-arm64,android-x64 -Ptarget=lib\main.dart
-Ptrack-widget-creation=true -Pshrink=true assembleDebug
[+3779 ms] > Task :app:compileFlutterBuildDebug
[ +1 ms] [ +122 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] [ +257 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] [ ] 198df796aa80073ef22bdf249e614e2ff33c6895
[ +1 ms] [ ] executing: [C:\flutter/] git tag --points-at HEAD
[ +77 ms] [ +246 ms] Exit code 0 from: git tag --points-at HEAD
[ +1 ms] [ ] 1.23.0-18.1.pre
[ ] [ +11 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +204 ms] [ +226 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ +1 ms] [ ] origin/beta
[ +1 ms] [ ] executing: [C:\flutter/] git ls-remote --get-url origin
[ +186 ms] [ +217 ms] Exit code 0 from: git ls-remote --get-url origin
[ +1 ms] [ ] https://github.com/flutter/flutter.git
[ +298 ms] [ +250 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
[ +206 ms] [ +224 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ +93 ms] [ +70 ms] Initializing file store
[ +1 ms] [ +13 ms] Done initializing file store
[ ] [ +38 ms] Skipping target: gen_localizations
[ +695 ms] [ +652 ms] Skipping target: kernel_snapshot
[ +396 ms] [ +394 ms] Skipping target: debug_android_application
[ +1 ms] [ ] Persisting file store
[ +1 ms] [ +10 ms] Done persisting file store
[ +1 ms] [ +5 ms] build succeeded.
[ ] [ +13 ms] "flutter assemble" took 1 269ms.
[ ] [ +3 ms] ensureAnalyticsSent: 0ms
[ ] [ +1 ms] Running shutdown hooks
[ ] [ ] Shutdown hooks complete
[ ] [ +3 ms] exiting with code 0
[ +197 ms] > Task :app:compileFlutterBuildDebug FAILED
[ +2 ms] 1 actionable task: 1 executed
[ +1 ms] FAILURE: Build failed with an exception.
[ +3 ms] * Where:
[ +1 ms] Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 677
[ +1 ms] * What went wrong:
[ ] Execution failed for task ':app:compileFlutterBuildDebug'.
[ ] > Process 'command 'cmd'' finished with non-zero exit value -1073741511
[ ] * Try:
[ ] 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.
[ ] * Get more help at https://help.gradle.org
[ ] BUILD FAILED in 6s
[ +572 ms] Running Gradle task 'assembleDebug'... (completed in 7,0s)
[ +7 ms] "flutter apk" took 7 403ms.
[ +6 ms] Gradle task assembleDebug failed with exit code 1
[ +1 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 buildGradleApp (package:flutter_tools/src/android/gradle.dart:414:7)
#2 _rootRunUnary (dart:async/zone.dart:1198:47)
#3 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#4 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#5 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#6 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#7 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#8 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#9 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#10 _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart)
#11 _rootRunUnary (dart:async/zone.dart:1198:47)
#12 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#13 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#14 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#15 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#16 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#17 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#18 _rootRun (dart:async/zone.dart:1190:13)
#19 _CustomZone.run (dart:async/zone.dart:1093:19)
#20 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#21 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#22 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#23 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#24 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#25 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)