2

I am trying to build apk with Phonegap 6.0.1 at path

/path/to/myproject/platforms/android/cordova

run command build --releaseget error as below enter image description here

here is screenshot of android sdk manager enter image description here enter image description here I also try change in file

yourApp/platforms/android/project.properties    
yourApp/platforms/android/CordovaLib/project.properties

target=android-23 to target=android-24
also update AndroidManifest.xml to

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="24" />

but same error

CordovaError: Please install Android target: "android-24".

can anyone help Thanks in advance for help

Dinesh
  • 835
  • 2
  • 17
  • 37
  • Have you added the tools and platform-tools directories to your path? i.e. http://stackoverflow.com/a/20679414/417681 – wildabeast Mar 17 '16 at 16:23
  • @wildabeast, I add sdk path tools with these steps Advance System Setting > Environment variables >System variables > edit valuable path & add ;C:\Development\android-sdk\platform-tools;C:\Development\android-sdk\tools;C:\Program Files (x86)\Android\android-sdk\tools;C:\Program Files (x86)\Android\android-sdk\platforms at end, but still same error – Dinesh Mar 19 '16 at 13:38
  • @wildabeast if I type "android" in run & cmd then Android SDK manager is also open – Dinesh Mar 19 '16 at 13:40
  • See this post: http://stackoverflow.com/questions/36053007/cordova-error-please-install-android-target-android-23-phonegap-6-0-1 – TechTurtle Mar 25 '16 at 20:33
  • @Dinesh, first you gotta ensure that you have android-24 sdk installed – Gandhi Mar 30 '16 at 10:06

1 Answers1

0

I've been having this issue for a LONG TIME now and I finally got a solution for myself.

I forgot to set the ANDROID_HOME system variable. It has to be set to the directory android-sdk.

Try adding the ANDROID_HOME variable and set it to your android-sdk root directory. (not tools or platform-tools)

Julisch
  • 308
  • 1
  • 16