Closed gkorland closed 9 years ago
Unable to reproduce, need to provide more details about your environment. What Linux distro? Also provide any erros and run grunt in verbose mode Maybe you need to try again and make sure you run the create before running the add platform Here is what I tried:
options: {
path: 'project',
cli: 'cordova' //cordova or cca
},
create2: {
options: {
command: 'create',
id: 'com.myapp.app',
name: 'MyApp'
}
},
add_android_platform: {
options: {
command: 'platform',
action: 'add',
platforms: ['android']
}
}
Run create subtask
./node_modules/.bin/grunt cordovacli:create
Then run the add android platform subtask
./node_modules/.bin/grunt cordovacli:add_android_platform
Here is my output:
/Users/csantana23/dev/cordova/grunt-cordovacli
(master)$ ./node_modules/.bin/grunt cordovacli:create
Running "cordovacli:create" (cordovacli) task
Using cordova CLI version (4.3.0)
Running:/Users/csantana23/dev/cordova/grunt-cordovacli/node_modules/cordova/bin/cordova create project com.myHybridApp myHybridApp
Creating a new cordova project with name "myHybridApp" and id "com.myHybridApp" at location "/Users/csantana23/dev/cordova/grunt-cordovacli/project"
Done-> cordova create project com.myHybridApp myHybridApp
Done, without errors.
/Users/csantana23/dev/cordova/grunt-cordovacli
(master)$ ./node_modules/.bin/grunt cordovacli:add_android_platform
Running "cordovacli:add_android_platform" (cordovacli) task
Using cordova CLI version (4.3.0)
Setting Current Working Directory (CWD) to project
Running:/Users/csantana23/dev/cordova/grunt-cordovacli/node_modules/cordova/bin/cordova platform add android
npm http GET https://registry.npmjs.org/cordova-android/3.7.1
npm http 200 https://registry.npmjs.org/cordova-android/3.7.1
npm http GET https://registry.npmjs.org/cordova-android/-/cordova-android-3.7.1.tgz
npm http 200 https://registry.npmjs.org/cordova-android/-/cordova-android-3.7.1.tgz
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.myHybridApp
Name: myHybridApp
Android target: android-21
Copying template files...
Project successfully created.
Done-> cordova platform add android
Success-> with Parallel tasks
Done, without errors.
/Users/csantana23/dev/cordova/grunt-cordovacli
(master)$ ls project/platforms/
android
Running the following on Linux creates platform folder not in project folder but on the same level.
I do see the following logs: