Android SDK and Eclipse with Phonegap: “No android

2020-07-29 00:14发布

问题:

I followed the installing instructions like here or anywhere else: http://mobile.tutsplus.com/tutorials/android/android-sdk-installation/

When I want to create a new project with Phonegap it says:

No Android Targets are installed. Please install at least one via the android SDK

Everything is in the bash_profile, Eclipse installed, SDK installed, Android Devices are set up.

Can anyone help please?

Thank u very much in advance!

回答1:

The error message pretty much says it all.

In your SDK Manager, you need to download one or more "SDK Platform" entries, depending upon the API level that you are looking to compile against, such as the one I have higlighted below:



回答2:

If you are getting this error and you've installed Android SDK it is because Phonegap 2.6.0 has incorrect Android instructions, which they will address in the next build of Phonegap.

The way to fix this error is to edit /phonegap2.6.0/lib/android/bin/create and change ANDROID BIN={boilerplate code} to ANDROID BIN=/Users/tim/Development/android-sdk-macosx/tools/android substitute this path with your android-sdk/tools/android directory. Your tools directory alone will not work and will continue to throw an error.