gpt4 book ai didi

flutter - 异常:[!] 您的应用正在使用不受支持的 Gradle 项目

转载 作者:行者123 更新时间:2023-12-04 04:09:08 25 4
gpt4 key购买 nike

我正在尝试运行现有的 Flutter 应用程序,但出现此异常。我该如何解决这个问题?

异常:[!] 您的应用正在使用不受支持的 Gradle 项目。要解决此问题,请通过运行 flutter create -t app <app-directory> 创建一个新项目然后将 dart 代码、 Assets 和 pubspec.yaml 移动到新项目。

这是我的 Flutter 医生结果:

[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.4 19E287, locale en-EE)
• Flutter version 1.17.1 at /Users/varsik/Documents/flutterConfigurationFiles/flutter
• Framework revision f7a6a7906b (2 weeks ago), 2020-05-12 18:39:00 -0700
• Engine revision 6bc433c6b6
• Dart version 2.8.2


[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/varsik/Library/Android/sdk
• Platform android-29, build-tools 29.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_212-release-1586-b4-5784211)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B500
• CocoaPods version 1.8.4

[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] Connected device (1 available)
• Pixel 3 XL • 8B8Y0VETV • android-arm64 • Android 10 (API 29)

• No issues found!

最佳答案

也许你从中删除了一行

project/android/app/build.grade

尝试添加这段代码

apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

行后

apply plugin: 'com.android.application'

关于flutter - 异常:[!] 您的应用正在使用不受支持的 Gradle 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62064188/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com