Eclipse Android Project no Target available - android

I just installed the latest version of Eclipse and the Android SDK. In the Android SDK Manager I installed everything, and in Eclipse I installed the ADT Plugin.
If I choose new Android project, I can't choose any Build Target. How can i select different build targets?
Thanks for your help!

I had the same issue and had to go to Eclipse > Window > Preferences > Android to set the Android SDK location (C:\Program Files\Android\android-sdk in my case).
You can see this post: android can not find a target
and
http://www.mail-archive.com/android-beginners#googlegroups.com/msg17763.html

first of all select SDK manager in the android folder, then a windows pops up automatically in which certain packages are selected, from which you can select the platform on which you want to develop you application..... it will take some time to download those packages
Then go to preference(Eclipse) -> select android from the leftbar -> select target in the right bar -> got to the program Files - > select android -> select sdk -> Finish
Before running you application perform the following steps ->
-> select project name from the project explorer
-> select run as -> run configuration -> select android configuration -> select project name and activity name to start with -> Select target tab from the above -> it shows the platform which you have installed -> select that platform -> select run
don't forget i struggled with it, always mention the activity name in the manifest file otherwise what ever you program, it will never comes on emulator, but shows error....

You have to open the SDK Manager in the location in which you installed the Android SDK and download individual build targets depending on the Android version you want to develop for.
See Step 4 Here: http://developer.android.com/sdk/installing.html

Perhaps you've missed Step 4. Adding Platforms and Other Components at http://developer.android.com/sdk/installing.html . Pay attention on it.

To fix this problem, open SDK manager thru programs or eclipse. It will show available packages to download. In that list don't select the latest one. Select Versioin 2.2(API 8). Then install all sub packages (there are six) inside that.

the same error for me, Just activate "Automatic Updates" in eclipse, restart, install the new update of eclipse, you will be notified> now you can select in the preference android: your folder and all target will be there

Related

JavaFXPorts and eclipse

Recently i have been trying to transfer my javafx app on android mobile devices. Javafxports seens to be the way to do it, but I am looking for a quick way to do it through eclipse and not using the "command line", to go to a path and run gradle command. Can someone post a brief guide if there is such a way to build everything from eclipse IDE?
Thank you in advance.
How to use eclipse and gradle to install a JavaFX App on Android.
1. Download and extract e(fx)clipse ( I have downloaded the ALL_in One). I downloaded 4.4.
2. Download and install JDK 8u40 or greater from Oracle website. I downloaded v8u45 64-bit for Windows.
3. Download Android SDK Tools( I downloaded and extract android-sdk_r24.1.2-windows.zip)
Run "SDK Manager.exe" and install
(a) Tools -> Android SDK Build-tools 21.1.2
(b) Android 5.0.1 (API 21) -> SDK Platform
(c) Extras -> Android Support Library.
4. Download sample application of JavaFX and later extract it to eclipse "workspace".
5. Run eclipse and download Gradle Integration for Eclipse (4.4) by drag and drop from web to eclipse.
If that does not work go to
Help -> Install New Software -> Add... -> Location: http://dist.springsource.com/release/TOOLS/update/e4.4/ -> Core / Eclipse Integration for Gradle -> Gradle IDE
6. In Eclipse go to
File -> Import... -> Gradle |_ Gradle Project
(a) Browse to eclipse workspace where you have extracted "Sample Application from Step 4"
(b) Press "Build Model" button
(c) Choose JavaFXAndroid project and "Finish"
7. Edit "build.gradle" file and change androidSdk parameter to indicate the directory where you have extracted Android SDK Tools in Step 3
8. Check if the build runs ok on windows machine
In Package Explorer
Right Click on JavaFXAndroid -> Run As -> 2 Gradle Build... -> type "run" in the large editor and press "Run" button
9. Install it on an android with version > 4.
In Package Explorer
Right Click on JavaFXAndroid -> Run As -> 2 Gradle Build... -> type "androidInstall" in the large editor and press "Run" button
Note: Make sure that you have installed the correct ADB driver for your device and that your device is in developer mode.
10. Enjoy:)
i dont know how the plugins on eclipse are, but on intellij you got there is gradle plugins and it reads the configured tasks. So you can configured easily your own "run". I bet you can do it to with eclipse.

Android SDK is missing, out of date, or is missing templates. Please ensure you are using SDK version 22 or later

Possible duplicate, I just download a Android Studio Zip file like Eclipse, as I opened getting this error.
But problem is how to update it?
same problem happened to me, From this
I have faced the same issue, to solve it:
1- delete (or move) the projects folder (AndroidStudioProjects).
2- Run the Android-Studio (a WELCOME screen will started).
3- From Welcome Screen choose, "Configure -> Project Defaults -> Project Structure)
4- Under Platform Settings choose SDKs.
5- Select Android SDK -> right_click delete.
6- Right_click -> New Sdk -> Android SDK -> choose your SDK dir -> then OK.
7- Choose the Build target -> apply -> OK. enjoy
I had same issue in Android Studio 3. (the project was open) so I closed the current project and the IDE automatically prompted to download the latest components. once its done everything was working correctly.
Here's a better approach where you don't have to delete/move anything for Android Studio 3.+.
Open Android Studio and click cancel/ignore for error prompts on missing SDK for each project.
Close all your open projects. You can do this by File > Close Project.
After you do step 1 for all projects, the Welcome screen appears.
The welcome screen will detect you are missing the SDK and give you options to fix the problem, i.e., install the SDKs for you.
Click on Tools > SDK Manager or click SDK Manager
after If you are unable to see the location of your Android SDK Location, click on edit and create a folder where you want to keep it and then click Next and Finish
Source: https://stackoverflow.com/a/46351772/13093413
(Top right corner) File > Close Project > After you close the project you will get a screen which says that you don't have an sdk and will ask you if you want to install it.
I was able to trigger an SDK download like this:
Close Android Studio
Open android studio, but be ready
Once you see "loading project", click cancel. (this will only appear for seconds on a fast machine)
The SDK download window appeared!
If Android Studio directly opening your project instead of setup window, then just close the windows of all projects. Now you will able to see the startup window. If SDK is missing then it will provide option to download SDK and other required tools.
It works for me.
Create SDK folder at \Android\Sdk
Close any project which is already open in Android studio
Android Studio setup wizard will appear and perform the needed installation.
Press escape to close all errors.
close project
Android studio will prompt to install SDK
Install the SDK and configure project
1.Click on Configure
2.Then Choose Project Defaults
3.Click on Project Structure
4.Set android sdk path
You will find here "C:\User\YourPcname\AppData\Local\SDK"
Note: Sometime AppData may hidden if it will not show then enable show hidden content.
5.Apply Changes
6.Then Select Sdk From Configure option
7.Then Android sdk manager page is open
8.In bottom you will see Install packages option
9.Install them and enjoy.

Unable to resolve target 'android-18' error

i am unable to download target android-18 file
In ``default.properties` file .
set target=android-18.
Check also that you installed this API level and check it in properties window, like:
In my case 17 is selected
Right click on your project select Properties(Alt+Enter),
goto Android(Project build Target)-> Check Android 4.2.2 or earlier version which you have, click on Apply-> OK, that's it.
finally clean your project, Done!!
First open Android SDK Manager and check whehther API18 (Android 4.3) SDK platform is downloaded or not. If not download it by selecting check box then accept license and press install package.
Next close and open eclipse again.
now it will show API18 (Android 4.3) SDK platform in Android SDK Manager as installed.
after that select project -> Properties -> Android -> mark checkbox Android 4.3 in project build target ->apply ->ok.
select project -> project-> clean.
I thing u r importing Project in eclipse some Android Project Not Find Target sdk So we Add target sdk like Right Click on ProJect GO To Properties GO to Android and Select Taget if Not Install than Download Adt plugin For Eclipse
The error is well justified, either you dont have correct properties added or you are missing the SDK.
Please check this link,
Unable to resolve target 'android-XX'
Hope it helps

The "Run As -> Android Application" is no longer an option in my Eclipse Run Configuration

I'm running Eclipse 3.7.2 on a Win7 machine. I have the Android SDK and AVD. All was working well. I have an Android App project that I've run under the emulator on an AVD and on a real Android device. ADB worked fine as well.
At some point I grabbed SDK Android 4.0.3. Then I had to upgrade a few more things that I cannot remember, perhaps my AVD. But ever since this upgrade there is no option to run my package as an Android Application anymore. If I choose "Run" it throws up a menu asking me to select a way to run it and "Android Application" is not a choice. It has to be Java App, etc. If I open "Run Configurations" there is no "Android Application" in my left column.
My SDK manager still lists Android 4.0 and Android 4.0.3 as "Installed." My AVD Manager still let's me launch an Android virtual device and even create a new one. But Eclipse does not let me run my package as an Android Application.
Make sure you check for updates to the Android ADT plug-in for Eclipse in addition to upgrades for the AVDs, SDKs, and other debug tools. Then make sure you're in your Android perspective (upper left of Eclipse window), rather than some other/generic Java perspective (no Android-specific options).
Also, you can check under Window > Customize Perspective... in Eclipse to double-check that all the Android options (menus, context items, views, toolbars) you want are enabled.
UPDATE:
You can add the Android tools to any perspective (I named mine "Android"). From the DDMS or Java perspective, go to Window > Customize Perspective - DDMS. Click the Command Groups Availability tab, and make sure that "Launch" is checked.
Also go to Project > Properties > Run/Debug Settings and check that there is a Launch Configuration listed. Create/Edit that configuration and confirm that it has an Android tab (usually set to run the Default Activity from your Manifest).
If not, there may be something wrong with your project's association - try right-clicking on your Project in Project Explorer, go to Android tools (if available) > Fix Project Properties. I believe there's an Ant tool that can do this from the command-line, but you'd have to check the Android/Google docs.
There's also the possibility that something's off with your Eclipse installation or that you've got a newer ADT plug-in than your version of Eclipse. Eclipse Juno (v4.2) released at the end of June, and the most recent ADT plug-in may be looking for something that's not there in your v3.7 install.
What fixed it for me was:
Right-clicking on the Project Name in the Package Explorer
Android Tools -> Fix Project Properties
After that I was able to just Click Run As -> Android Application and all was well for me
Click mouse right button on your project -> Configure -> Convert ADT Android Configuration
An easy fix is to manually create an android run configuration:
Run / Run configurations..., then right click on "Android application" and select new, select your project and click Run.
I had a similar problem. What I finally did that worked was go into Project->Properties->Java Build Path->Order and Export and I made sure that the /gen files we're first in the sequence followed by the /src files.

Android Eclipse

I am not able to start a new project in eclipse. Every time I go for new Android project it gives the warning "SDK target must be specified" and I don't know how to do that.
- At first you need to download Android SDK, and decompress.
- You will need to install Eclipse ADT plugin
Then (from the android website)
1. Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
2. Select Android from the left panel.
3. For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
4. Click Apply, then OK.
Thats all
Reference:
install: http://developer.android.com/sdk/installing.html
configure: http://developer.android.com/sdk/eclipse-adt.html#installing
"Target must be specified" means that you need to select the correct Android version from the big list in the New Project window.

Categories

Resources