Arko Elsenaar
Arko Elsenaar

Reputation: 1729

Cordova platform add android weird issue

I have created my Cordova app with this command:

cordova create testapp com.example.testapp TestApp

Then cd'd into it cd testapp and when trying to add the android platform: cordova platform add android result is below:

cordova platform add androidCreating android project...
Creating Cordova project for the Android platform:
    Path: platforms/android
Package: com.optie24.optie24
Name: Optie24
Android target: android-19
Copying template files...
shell.js: internal error
Error: ENOENT, no such file or directory 'platforms/android/assets'

Who can help me out? It is really weird, I assume the 'platform add android' command should create the folders mentioned.


Updated response:

cordova -d platform add android
cordova library for "android" already exists.
Checking if platform "android" passes minimum requirements...
Creating android project...
Running command: /home/arko/.cordova/lib/android/cordova/3.4.0/bin/create --cli /media/arko/apps/testapp/platforms/android 
Creating Cordova project for the Android platform:
    Path: platforms/android
    Package: com.example.testapp
    Name: TestApp
    Android target: android-19
Copying template files...
shell.js: internal error
Error: ENOENT, no such file or directory 'platforms/android/assets'

Update

Still having issues with this, thought I figured out as I had set my PATH variable temporarily, but making this permanent didn't fix it. Have tried due to a suggestion of a friend to update the platform with: cordova platform update android but I obviously can't do that as the platform wasn't even added.

Anyone else with this issue?

Upvotes: 7

Views: 9791

Answers (2)

ArunKolhapur
ArunKolhapur

Reputation: 6915

Just change the permissions for your phonegap app directory.

sudo chmod -R 777 <path_to_phonegap_dir>

Then just cd to you phonegap directory and run the app.

phonegap local run android

Happy Coding :)

Upvotes: 15

Matt Davies
Matt Davies

Reputation: 1269

It's related to a known issue:

https://github.com/MobileChromeApps/mobile-chrome-apps/issues/123

You can workaround by creating an empty folder called "platforms" within your app directory.

Upvotes: 0

Related Questions