Cordova : [Error: Please install Android target: "android-21" -


i updated cordova + ionic in app, after installed android-sdk v22 via android sdk manager.

but after running command:

cordova build android  

i following message:

running command: /users/peter/workspace/myapp/platforms/android/cordova/build  [error: please install android target: "android-21".  hint: open sdk manager running: /users/peter/adt-bundle-mac/sdk/tools/android require: 1. "sdk platform" android-21 2. "android sdk platform-tools (latest) 3. "android sdk build-tools" (latest)] error building 1 of platforms: error: /users/peter/workspace/myapp/platforms/android/cordova/build: command failed exit code 2 may not have required environment or os build project error: /users/peter/workspace/myapp/platforms/android/cordova/build: command failed exit code 2     @ childprocess.whendone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)     @ childprocess.emit (events.js:110:17)     @ maybeclose (child_process.js:1008:16)     @ process.childprocess._handle.onexit (child_process.js:1080:5) 

i tried

cordova platform rm android  cordova platform add android  

but same result:

i tried find few hours working solution, luck.

thanks advice.

system information:

os: mac os x yosemite node version: v0.12.0 cordova cli: 4.3.0 ionic version: 0.9.27 ionic cli version: 1.3.18 xcode version: xcode 6.2 build version 6c131e  ios-sim version: 3.1.1  ios-deploy version: 1.4.0  

i had same problem. had change target:

# project target. target=android-22 

this should done in 2 files:

myapp/platforms/android/project.properties myapp/platforms/android/cordovalib/project.properties

also manifest should updated:

<uses-sdk android:minsdkversion="14" android:targetsdkversion="22" /> 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -