Reputation: 81
Launching lib/main.dart on Android SDK built for x86 in debug mode...
[!] Gradle does not have execution permission. You should change the ownership of the project directory to your user, or move the project to a directory with execute permissions. Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
Upvotes: 8
Views: 15690
Reputation: 11
I had the same issue (Arch Linux), for some reason permissions where wrong in the flutter path:
sudo chown -R $(whoami) /opt/flutter/packages/flutter_tools/
Upvotes: 1
Reputation: 155
FOR FLUTTER I have tried mostly everything mentioned here and on my own. The solution, actually, it is a series of solutions and worked for me, I am mentioning them try as you wish.
Make sure no antivirus *firewall is blocking, gradle.bat, gradlew.bat, git, flutter, android studio
Get the latest Gradle and install it to lower privilege directory, not in Program Files or Program Files (X86); I did it in D drive. Don't forget to update the path in Environment Variables.
I also installed JAVA Runtime (JRE).
Install git as it is necessary for flutter.
You can Check-in windows command line after installing each (Git, Gradle and flutter doctor). if nothing seems to work Restart the pc after each.
After this when you will compile /run the app it will take a long time please bear with that(at least 15 min just to be sure).
I had the app directory with Read, Write & Modifying permissions still, it was giving that error- Error code 1 "gradle does not have execution permission. you should change the ownership of the project directory to your user, or move the project to a directory with execute permissions."
so I think it is related to the connection with the plugin.
Hope it helped :-)
Upvotes: 2
Reputation: 1489
chmod a+rx android/gradlew
This works but for windows you need to install "Git for Windows"
Upvotes: -3
Reputation: 123
Try to set the execution flag on your gradlew file:
chmod +x gradlew
Upvotes: 1
Reputation: 781
I got the same error trying to execute flutter run
on a mac. Apparently, in your flutter project, there is a file android/gradlew
that is expected to be executable (and it wasn't). So in my case, I ran...
chmod a+rx android/gradlew
...afterwards the flutter
command worked.
Upvotes: 60