skip to Main Content

I copied/pasted my project folder from my desktop to my laptop and installed most of the things needed, like the Android SDK, flutter, and the dart sdk. However, when I try to run my app, it gives an error:

Starting Gradle Daemon...
Gradle Daemon started in 2 s 402 ms

FAILURE: Build failed with an exception.

* What went wrong:
Executing Gradle tasks as part of a build without a settings file is not supported. Make sure that you are executing Gradle from a directory within your Gradle project. Your project should have a 'settings.gradle(.kts)' file in the root directory.

Why would this file be missing if I copied the whole project root folder?

2

Answers


  1. Chosen as BEST ANSWER

    The problem was that I was hitting the play button while the configuration was set to something other than main.dart.


  2. In terminal run

    flutter run
    

    In the root directory of the project..

    Or if you are using VS Code try

    f5 key to start debugging. Or in case of android srudio you should be seeing a play button to run it as a flutter project.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search