skip to Main Content

Good night, could someone please help me with this error when running the project in android studio?

I’ve looked everywhere and can’t find a solution…

follow the error below

Launching libmain.dart on sdk gphone x86 in debug mode…
Exception: [!] Your app is using an unsupported Gradle project. To fix this problem, create a new project by running flutter create -t app <app-directory> and then move the dart code, assets and pubspec.yaml to the new project.

Thank you and I’ll be waiting

2

Answers


  1. You should create a new project and copy over the relevant files from the old one to the new one.

    As stated in the error, "to fix this problem, create a new project by running flutter create -t app and then move the dart code, assets and pubspec.yaml to the new project."

    What you need to do is run the command line command `flutter create -t app ‘ (where is the location of the new project. After this a new project will be created and you can move over your code, assets, and other files to the new project.

    Login or Signup to reply.
  2. project/android/app/build.grade

    Try adding this

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

    after this line

    apply plugin: 'com.android.application'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search