最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter cannot run for android - Stack Overflow

programmeradmin7浏览0评论

when create new project then I come get to run project show some error like this

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using    │
│ for Gradle.                                                                                      │
│                                                                                                  │
│ If you recently upgraded Android Studio, consult the migration guide at                          │
│ docs.flutter.dev/go/android-java-gradle-error.                                                   │
│                                                                                                  │
│ Otherwise, to fix this issue, first, check the Java version used by Flutter by running `flutter  │
│ doctor --verbose`.                                                                               │
│                                                                                                  │
│ Then, update the Gradle version specified in                                                     │
│ /Users/macbookpro/StudioProjects/untitled/android/gradle/wrapper/gradle-wrapper.properties to be │
│ compatible with that Java version. See the link below for more information on compatible         │
│ Java/Gradle versions:                                                                            │
│ .html#java                                │
│                                                                                                  │
│                                                                                                  │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1

flutter doctor:

[✓] Flutter (Channel stable, 3.19.2, on macOS 15.1.1 24B91 darwin-x64, locale
    en-IQ)
    • Flutter version 3.19.2 on channel stable at /Library/flutter
    • Upstream repository .git
    • Framework revision 7482962148 (1 year, 1 month ago), 2024-02-27 16:51:22
      -0500
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
    • Android SDK at /Users/macbookpro/Library/Android/sdk
    • Platform android-35, build-tools 35.0.1
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see /platform-plugins
      To install see
      .html#installation for
      instructions.

[✗] Chrome - develop for the web (Cannot find Chrome executable at
    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2024.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      
发布评论

评论列表(0)

  1. 暂无评论