Exception: [!] your app is using an unsupported gradle project. 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.

Exception: [!] your app is using an unsupported gradle project.

To fix this problem, you need to create a new Flutter project and then move your existing Dart code, assets, and pubspec.yaml file to the new project. Follow the steps below to resolve the issue:

  1. Open your terminal or command prompt.
  2. Run the following command:
    flutter create -t app <app-directory>
  

Replace <app-directory> with the desired directory name for your new Flutter project.

For example, if you want your new project to be named “my_flutter_project”, you should run:

    flutter create -t app my_flutter_project
  

This command will create a new Flutter project with the necessary gradle configuration files.

  1. After the new project is created, navigate to the directory containing your existing Flutter app that is encountering the unsupported gradle project error.
  2. Copy the Dart code, assets, and pubspec.yaml file from your existing project to the corresponding directories in the newly created project.

Make sure to replace any existing files in the new project with the ones from the existing project.

Once you have moved all the necessary files, your new project should have the correct gradle configuration and you should be able to build and run your app without encountering the unsupported gradle project error.

Same cateogry post

Leave a comment