我想用 flutter 运行我的第一个应用程序,但出现以下错误:

在 Debug模式下在为 x86 64 构建的 Android SDK 上启动 lib/main.dart。
初始化gradle。
解决依赖关系。
完成后出现如下错误:



这是 flutter doctor 的结果:

abdoul-razak@Komche:~/Projects/akoybiz$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Linux, locale fr_FR.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    ✗ Android license status unknown.
[✓] Android Studio (version 3.0)
[✓] VS Code (version 1.30.2)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

更新 sdk android 后,这里是 flutter doctor -v 的结果
 abdoul-razak@Komche:~/Projects/akoybiz$ flutter doctor -v
[✓] Flutter (Channel stable, v1.0.0, on Linux, locale fr_FR.UTF-8)
    • Flutter version 1.0.0 at /home/abdoul-razak/flutter
    • Framework revision 5391447fae (il y a 9 semaines), 2018-11-29 19:41:26
      -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /home/abdoul-razak/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /home/abdoul-razak/Android/Sdk
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.0)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 23.2.1
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] VS Code (version 1.30.2)
    • VS Code at /usr/share/code
    • Flutter extension version 2.22.2

[✓] Connected device (1 available)
    • itel P31 • 45YP8LSO4T7HWCLZ • android-arm • Android 7.0 (API 24)

• No issues found!

最佳答案

该问题与您的 Android SDK 许可证有关。运行命令
flutter doctor --android-licenses
然后按 y 直到它获得所有权限。

关于android-studio - Flutter 以错误 : ProcessException: Permission denied 完成,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/54433456/

10-14 01:27