Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 542
Arko Elsenaar Avatar asked May 07 '14 13:05

Arko Elsenaar


1 Answers

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 :)

like image 156
ArunKolhapur Avatar answered Oct 15 '22 22:10

ArunKolhapur