\ android \ gradlew.bat”在运行Flutter App时退出异常错误

时间:2019-09-15 05:16:44

标签: flutter flutter-dependencies

当我尝试运行Flutter应用程序时,在控制台中出现以下错误。

Launching lib\main.dart on Redmi Note 5 Pro in debug mode...
Initializing gradle...
Finished with error: ProcessException: Process "C:\Users\Ananthakrishnan A\Desktop\basic\flutter_app\android\gradlew.bat" exited abnormally:

------------------------------------------------------------
Gradle 4.10.2
------------------------------------------------------------

Build time:   2018-09-19 18:10:15 UTC
Revision:     b4d8d5d170bb4ba516e88d7fe5647e2323d791dd

Kotlin DSL:   1.0-rc-6
Kotlin:       1.2.61
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_202-release (JetBrains s.r.o 25.202-b03)
OS:           Windows 10 10.0 amd64
  Command: C:\Users\Ananthakrishnan A\Desktop\basic\flutter_app\android\gradlew.bat 

此外,当我在控制台中尝试Flutter Doctor时,它会产生以下问题

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\android-sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\android-sdk
    • Java binary at: C:\Program Files\Android\Android Studio2\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
      instructions.

我尝试使用flutter doctor --android-licenses命令解决该问题,但提示未找到sdkmanager

    Android sdkmanager tool not found (C:\android-sdk\tools\bin\sdkmanager).
Try re-installing or updating your Android SDK,.

我在tools / bin / folder中找不到sdkmanager。但是sdk管理器选项可在android studio中使用。请帮助我

我已经尝试并删除了gradle文件,并重建了项目,并尝试使用flutter Doctor添加许可证,但均未能解决问题。

0 个答案:

没有答案