posts - 319, comments - 22, trackbacks - 0, articles - 11
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

project already exists delete and recreate Cordova (MacOS)

Posted on 2013-02-17 13:12 RTY 阅读(1068) 评论(0)  编辑 收藏 引用 所属分类: Mac os
根据我的环境说明一下:
1、Cordova的目录:/Users/kevin/Projects/HTML5/cordova-2.4.0/cordova-android

2、AndroidSDK目录: /Users/kevin/TBB/adt-bundle-mac-x86_64/sdk

3、设置方法:
(1)Terminal: 定位到Cordova的目录。
       cd /Users/kevin/Projects/HTML5/cordova-2.4.0/cordova-android
 (2)设置环境变量
       export PATH=/Users/kevin/TBB/adt-bundle-mac-x86_64/sdk:/Users/kevin/TBB/adt-bundle-mac-x86_64/sdk/tools/:$PATH

 (3)执行 ./bin/create ~/Desktop/myapp com.myapp.special MyApp

特殊说明:
./bin/create /Users/kevin/CordovaProjects/Android/ChunMiaoPu com_chunmiaopu_android chunMiaoPuAndroid

会出现错误:
An unexpected error occurred: "$ANDROID_BIN" create project --target $TARGET --path "$PROJECT_PATH" --package $PACKAGE --activity $ACTIVITY >&/dev/null exited with 1
Deleting project...


只有执行如下才可以:./bin/create ~/CordovaProjects/Android/ChunMiaoPu com.chunmiaopu.android chunMiaoPuAndroid


~/MyWorkSpace/JiffAndroidApp 会自动创建JiffAndroidApp目录

devmatoMacBook-2:cordova-android kevin$ ./bin/create ~/MyWorkSpace/JiffAndroidApp me.jiff.AndroidApp JiffAndroidApp
An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1
Deleting project...
devmatoMacBook-2:cordova-android kevin$ export PATH=/Applications/eclipseForADT-20130219/sdk:/Applications/eclipseForADT-20130219/sdk/tools/:$PATH  
devmatoMacBook-2:cordova-android kevin$ ./bin/create ~/MyWorkSpace/JiffAndroidApp me.jiff.AndroidApp JiffAndroidApp
devmatoMacBook-2:cordova-android kevin$ 

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理