Exotic Cut 5276
Exotic Cut 5276

Reputation: 255

Adding android platform on ionic

user@DESKTOP-QM061K3:/mnt/d/mobapp1$ ionic platform add android
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               function bold() { [native code] } https://github.com/driftyco/ionic-default-resources/archive/master.zip
[=============================]  100%  0.0s
Warning: using node version v0.12.17 which has been deprecated. Please upgrade to the latest node version available (v6.x is recommended).


Error during untar for /home/user/.cordova/lib/npm_cache/cordova-android/6.0.0/package.tgz: Error: EACCES, open '/home/user/.cordova/lib/npm_cache/cordova-android/6.0.0/package/package.json'


Error: Failed to fetch platform android
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: EACCES, open '/home/user/.cordova/lib/npm_cache/cordova-android/6.0.0/package/package.json'

I have been trying to build android project on linux installed on top of my windows laptop. But when I tried to use ionic platform add android it would result in the errors as shown above. I tried searching the web but could not find any help.

Upvotes: 0

Views: 112

Answers (1)

Austin
Austin

Reputation: 36

Usually an EACCES error in my experience means you don't have permission to perform that operation.

You may've installed Ionic as root and so you may have to add the platform as root.

Try sudo ionic platform add android

Upvotes: 1

Related Questions