Error in running flutter project which no permission
Solution 1
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.
Solution 2
Try to set the execution flag on your gradlew file:
chmod +x gradlew
Solution 3
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.
- You might try it first, Disable the Gradle plugin and re-enable and restart android studio.
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 :-)
MuZ.
Updated on December 15, 2022Comments
-
MuZ. over 1 year
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)