I am just getting started with with Cordova ( PhoneGap ) and trying to build my first project with it, however I am running into a problem with my compilation step- when I t
Its different for every one, I guess. Running --verbose
would give you the file that Cordova needs access to. From there you can chmod 777 <file>
. The command you should run to figure out the inaccessible file looks like this: cordova build --release --verbose android
It's a permission issue, just execute:
chmod 777 "/media/glenatron/localdisk/Projects/Cordova/MyProject/platforms/android/cordova/build"
That should fix the problem.
For me, this has fixed it:
chmod 777 /Applications/Android\ Studio.app/Contents/gradle/gradle-2.2.1/bin/gradle
I was facing the same issue. In my case, I had put the sample cordova project on a different ext3 partition than home folder. Since the partition was not NTFS, permissions shouldn't have been a problem. But when I tried all suggested methods (changing permissions, making everything executable), none of them worked. This problem went away as soon as I created the sample cordova folder in my home partition.
For MAC users change the name from "Android Studio" to AndroidStudio. My cordova build was taking back slash() in name of android studio so i changed the name of app. It is working for me.
Using verbose like Solidak suggested works.
cordova build --release --verbose android
The last command was to access /platforms/android/gradlew
so i chmod +x
that file and it worked.