Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in running flutter project which no permission

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)

like image 800
MuZ. Avatar asked Nov 17 '19 15:11

MuZ.


People also ask

How do I check if permission is granted in flutter?

You can get a Permission 's status , which is either granted , denied , restricted or permanentlyDenied . var status = await Permission. camera. status; if (status.

How do you add permissions to flutter?

Add the permissions your app needs to the android/app/src/main/AndroidManifest. xml. Put the permissions in the manifest tag, infront of the application tag. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.

How do I run an existing flutter project?

Step 1: Open the Android Studio and select Tools from the menu bar and click on SDK Manager. Step 2: In the newly open window click on the plugins and in the search bar search for Flutter and Dart and then install it. Step 4: Now after installing Flutter and Dart we are ready to import a Flutter project.


1 Answers

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.

like image 169
J. Brazile Avatar answered Sep 22 '22 11:09

J. Brazile