got error on android with eclipse: no target available - android

i install all the programs that need for develop on android
i start project like this:
File - new - project - android - android project > next
but in build target i see: no target available
what can be the problem ?
thanks in advance

You probably didn't set the path to the Android SDK in eclipse yet.
Go to Window -> Preferences -> Android and enter the path to your SDK into the SDK Location textfield at the top.
You have no Android platforms installed
In this case go to
Window -> SDK and AVD Manager -> Available Packages -> Android Repository and select a few targets¹, then click install. You can check for already installed platforms on the left under Installed packages if you are not sure.
The targets you are looking for are the SDK Platform Android X.X , API Y, rev Z ones.
If you don't want to download much, I'd say get Android 2.3.3., API 10 and Android 3.2, API 13. 2.3.3. is the most recent phone version of Android, and 3.2 is the newest tablet version.
¹ If you got a decent internet connection I'd recommend to get everything, you will need a few target platforms sooner or later anyway.

You need to select a build target in that dialog, e.g. Google APIs 2.2. That dialog is a little confusing, because it has a scroll pane in it, which is easy to overlook. You need to scroll down to get to some options.

Related

Building Android game in Unity 4.3.4 does not succeed

The build does not work.
During build I have messages:
Android SDK is outdated. SDK Platform tool version 0<16. Android SDK
is missing required platform api. Minimuim platform required is
Android 4.0 (API level 14).
This happens though:
1) I have in Android SDK manager the following installed (as seen in Android Studio):
Tools - all 12 items,
Android L (API 20, L preview) - all 7 itmes,
Android 4.4W (API 20) - all 5 items.
In particular, I have everything with API 20 installed
2) I have a correct path to main folder of Android SDK location in Unity Preferneces -> External Tools
I'll appreciate any help or hints.
Press continue the next time you get it. Keep pressing it everytime that update message pops up. It's just Unity asking you to have the latest SDK package to build with the latest improvements in Android SDK, which is not necessarily mandatory. If Android updates would come 3-4 times a week,you can't be bothered with updating so often.
And when you finally decide it's time to update, or feel like it just some time later,
open up the SDK Manager (inside android-sdk folder), and update (don't check the sources, docs, and android emulator images; you don't need them. Just check core packages and necessary google APIs.).

How to get more target platform options for Eclipse AVD?

Using Eclipse, trying to create a new virtual device to test app on older Android versions, but when I go to create a new Android Virtual Device I only get one option - 4.4.2 API Level 19. How do I get other versions to show here? Last night I was a bit tired and tried to if using the SDK Manager to grab 4.0.3 SDK and Google API would work to test on older version, but it seemed to mess up Eclipse as I got an ADT needs update error (which would find no updates). So starting back from scratch and figured I'd ask instead of trial and error. Thanks!
Open the Android SD Manager, check Show: Updates/New
Select SDK Platform and ARM EABI v7a System Image (also Google APIs if you are unsing them) for all Versions you want to test and download them. You need the source of the Android-Version to create an AVD for it.
Updating your Android SDK build-tools and Android SDK Platform-tools is always recommanded because newer Android versions need a newer build tool setup.

Eclipse support for previous APIs

I have formatted my system and have installed "Eclipse - Juno". I have done all the Java path settings and SDK settings as well. But the eclipse shows the minimum target API level is 17 and Android version is 4.2. How do i get it to support API levels from 8 ?
How do i get the previous level SDKs? Can i use the SDK Manager to install them?
Set the minumum level api to 8 in your manifest.
Please also remember you have the required sdks installed and eclipse know where you have it.
Also, in your C:\Users{USERNAME}\android-sdks\extras\android\support
Has the v4,v7,13 backward capiabilty support libraries, add it to build path to use previous apis.
Have you downloaded the corresponding API level SDKs?
You need to download all your required SDKs. That is, when you install a new instance of the ADT, it only contains the latest API support. To download SDKs follow these steps.
Open Eclipse (Juno in your case)
Select Window -> Android SDK Manager
Wait for a few seconds till it loads the list of all SDKs (both installed and not installed, see under the status column).
Select the check boxes for all the APIs, Tools and Add-ons you want to download and click the Install nn packages... button. Select the "Accept All" radio button and click Install button and wait till it downloads all SDKs.
You may need to provide the correct SDK path if you have altered it during/after your installation.
Hope this helps.

New App - Build SDK Android 2.2 (API 8) not available. How to make it show up?

I'm trying to build a project at minimum Android 2.2 (API 8) for my Android 3.1 device. However, "Android 2.2 (API 8)" was not one of the options on the list. It only presented 3 options: Android v2.1, v4.0, and v4.0.3. The first one was too low for my project while the next 2 were too high for my device.
I checked to make sure that I already installed Android 2.2 in the SDK Manager.
So, how do I make "Android 2.2 (API 8)" become an option for my project? I must be missing something very simple. Thank you for your help.
Double check your PATH to sdk, which SDK it's pointing to?
I would check your /android-sdk-xxxx/platforms folder. You should have in there a folder called /android-8
If this is not present, you may not have it actually installed. Try to re-install and restart the AVD.
Here is a copy to place in your /platforms folder if that still does not work.
http://www.sendspace.com/file/21r31h

Problem with eclipse Android SDK update

I am newbie to android. I working on my HELLO WORLD project. Initially I had AVD which looks like
Then something went wrong so I deleted all Android stuff from Eclipse (except my project) then I added all things again to my Eclipse.
So now I have:
1) Android SDK tools , revison 12
2) Android SDK platform-tools,revision 6
3) SDK platform Android 3.2,API 13,revision 1
Now I got a new emulator which looks like a tablet emulator .
So my questions are
1) How can I get the previous emulator as Image 1 ( which looks like phone not tablet) ?
2) I am also getting error "Unable to resolve target Android-8". Why it is ? and how to get rid of it ?
Answers to your questions:
Ad 1) You need to install SDK platform for Android 1.x/2.x, Android 3.0 is dedicated to tablets so there will be no phone-like emulator,
Ad 2) Android-8 means Android API Level 8, this means Android SDK version 2.2.x. so you will need to install SDK for Android 2.2.x from the Android SDK Manager
More about Android API levels can be found here: http://developer.android.com/guide/appendix/api-levels.html
1.when creating avd you are selecting target.If you select target 2.1,2.2..You will see the first emulator and for the later one your are selecting taget 3.2 . So it looks like this.
2.You are importing/creating project from previous one whose target was api level 8.Now you are trying to run it in avd which is some other.So in manifest file set minSDK as your new avd
With the SDK manager, you have to create a new virtual device. For this virtual device you will set the Android version of your device (must be < 3 to have the "old" look).
It is simple
1) Create AVD
2) While creating if u want to develop for smart phone, select the target version <= 2.3 (Which will get you the keyboard)
3) While creating if u want to develop for tablet, select the target version as >= 3.0, which will get you the big pad emulator with no keypad.
Note: From Icecream sandwidch onwards the version is for both Smart phones and Tablets.
Regards,
SSuman185
You need to create new AVD with the target that you need,or edit the settings of the AVD that you are using now.
In Eclipse go to menu : Window -> Android SDK and AVD Manager and you will see a list of your AVD(if you have more than one).And after that you can select the one that you have,and press edit with changing the target to 1.5 and upper version or create a new one pressing button New.

Categories

Resources