**我已经按照指南进行操作了,但是它没有用,运行'flutter run'之后的简单控制台日志:**
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to process resources, see aapt output above for details.
* 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 15s
Gradle task 'assembleDebug'... Done 16.2s
Gradle task assembleDebug failed with exit code 1
“ flutter run -v”后的详细控制台日志:
[ +43 ms] executing: [/Users/chengzhichao/project/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +43 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/beta
[ ] executing: [/Users/chengzhichao/project/flutter/] git rev-parse --abbrev-ref HEAD
[ +7 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] beta
[ ] executing: [/Users/chengzhichao/project/flutter/] git ls-remote --get-url origin
[ +8 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ ] executing: [/Users/chengzhichao/project/flutter/] git log -n 1 --pretty=format:%H
[ +12 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] f37c235c32fc15babe6dc7b7bc2ee4387e5ecf92
[ ] executing: [/Users/chengzhichao/project/flutter/] git log -n 1 --pretty=format:%ar
[ +10 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 3 weeks ago
[ +1 ms] executing: [/Users/chengzhichao/project/flutter/] git describe --match v*.*.* --first-parent --long --tags
[ +264 ms] [ +237 ms] Building bundle
[ ] [ +1 ms] Writing asset files to /Users/chengzhichao/project/flutter_proj/myapp/czc/build/app/intermediates/flutter/debug/flutter_assets
[ +258 ms] [ +279 ms] Wrote /Users/chengzhichao/project/flutter_proj/myapp/czc/build/app/intermediates/flutter/debug/flutter_assets
[ +10 ms] [ +10 ms] "flutter bundle" took 1,333ms.
[ +545 ms] /Users/chengzhichao/Library/Android/sdk/platforms/android-27/android.jar: error: I/O error.
[ +8 ms] 20 actionable tasks: 5 executed, 15 up-to-date
[ +14 ms] FAILURE: Build failed with an exception.
[ +4 ms] * What went wrong:
[ ] Execution failed for task ':app:processDebugResources'.
[ ] > Failed to process resources, see aapt output above for details.
[ ] * 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 getfull insights.
[ ] * Get more help at https://help.gradle.org
[ ] BUILD FAILED in 4s
[ +443 ms] Gradle task 'assembleDebug'... (completed)
[ +17 ms] "flutter run" took 10,362ms.
Gradle task assembleDebug failed with exit code 1
#0 throwToolExit (package:flutter_tools/src/base/common.dart:26:3)
#1 _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:393:5)
<asynchronous suspension>
#2 buildGradleProject (package:flutter_tools/src/android/gradle.dart:296:14)
<asynchronous suspension>
#3 buildApk (package:flutter_tools/src/android/apk.dart:41:10)
<asynchronous suspension>
#4 AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:378:13)
<asynchronous suspension>
#5 FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:287:54)
<asynchronous suspension>
#6 HotRunner.run (package:flutter_tools/src/run_hot.dart:262:39)
<asynchronous suspension>
#7 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:391:37)
<asynchronous suspension>
#8 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:372:18)
#9 _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#10 _rootRunUnary (dart:async/zone.dart:1132:38)
#11 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#12 _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#13 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#14 Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#15 Future._complete (dart:async/future_impl.dart:476:7)
#16 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#17 _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
#18 _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:295:13)
#19 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#20 _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#21 _rootRunUnary (dart:async/zone.dart:1132:38)
#22 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#23 _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#24 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#25 Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#26 Future._complete (dart:async/future_impl.dart:476:7)
#27 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#28 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#29 _rootRun (dart:async/zone.dart:1124:13)
#30 _CustomZone.run (dart:async/zone.dart:1021:19)
#31 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#32 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#33 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#34 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#35 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
在flutter docter -v
之后打印
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.14 18A391, locale zh-Hans-CN)
• Flutter version 0.9.4 at /Users/chengzhichao/project/flutter
• Framework revision f37c235c32 (3 weeks ago), 2018-09-25 17:45:40 -0400
• Engine revision 74625aed32
• Dart version 2.1.0-dev.5.0.flutter-a2eb050044
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/chengzhichao/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.0, Build version 10A255
• ios-deploy 2.0.0
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 29.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] IntelliJ IDEA Ultimate Edition (version 2018.2.4)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 29.1.3
• Dart plugin version 182.4999
[✓] VS Code (version 1.28.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.19.0
[✓] Connected devices (1 available)
• MIX 2 • c54c0f85 • android-arm64 • Android 8.0.0 (API 26)