Add SDK to eclipse and no Target - java

I have installed android SDK in my computer successful.but when i configure the environment in eclipse.it show "No target available". Actually,i had loaded API form 1.6 to 4.0.I tried many ways to slove the question.but all is failure.now,i have no idea already.who can help me. i would thanks very much.

You need to do all of the following:
Download and install Java and Eclipse
Download and install the Android SDK
Install the Android plug-in for Eclipse (from Help, Install Software)
Configure Eclipse to point to your SDK
Create an Android virtual machine (for emulation)
Create an Android project (for your app)
Q: It sounds like maybe things are going wrong at Step 4, correct?
Q: If so, can you browse to the directory with your SDK (for example, from Eclipse can you browse to "C:\program files (x86)\android\android-sdk")?

Are you using the ADT Plugin for Eclipse? If you are you can easily configure Eclipse for Android Development. Android site says -
Select Window > Preferences... to open the Preferences panel (Mac OS
X: Eclipse > Preferences). Select Android from the left panel. You may
see a dialog asking whether you want to send usage statistics to
Google. If so, make your choice and click Proceed. You cannot continue
with this procedure until you click Proceed.
For the SDK Location in the main panel, click Browse... and locate
your downloaded SDK directory. Click Apply, then OK.
For more information you visit their configuration page - http://developer.android.com/sdk/eclipse-adt.html#configuring. Hope this helps
Ok so now did you first try out the option in the Options menu -
But if this doesn't work it means there is something wrong that is happening due to conflicts in OS. I would like to know what is your Desktop Environment? Ubuntu? Window? Mac?
I'll assume that your using a Windows environment... The best option the community has noted down is the usage of Force HTTPS resources to be downloaded via HTTP. You could also use a Proxy and get the URLs fetched.
For more information look at this thread.

Related

JDK directory is not set or invalid (unity)?

I am now creating a keystore for my game (in unity) but when I press the add key button, an error pops up
Java Development Kit (JDK) directory is not set or invalid. Please, fix it in Preferences -> External Tools
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)
I installed the JDK and checked the path of it in the terminal using the command /usr/libexec/java_home, then it shows me that the path of the JDK is /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home.
I copy and paste it in the JDK path in unity but the error still pops up.
I actually checked the JavaVirtualMachines in my computer's library but there's nothing in it.
How can I solve this problem? Any help is greatly appreciated.
Actually I solve this problem by adding the modules (Android SDK & NDK Tools, OpenJDK) to my Unity Editor. Actually if you tick the Android build support module, it won't automatically help you to tick the two modules above.
This solved for me in Linux (don't know if the case happens in Windows)
chmod -R 777 ~/Unity
This command set all privileges for all files/directories/subdirectories for the user.
Getting the error of this topic, for curiosity I tried to run the "java" executable inside the directory
~/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK/bin/
And got:
bash: ./java: Permission Denied
This explains why set the privileges.
I had the same problem, another solution doesn't work for me!!
I just uninstalled and then installed back using the unity HUB and it's worked.
Click on the three dots and uninstall
then click on add to install back the desired module.
While installing don't forget to check android build support and its all subcategories.
Also, I think I had installed more than one version of unity, that could also be a problem.
Check your Unity installation path in my case
C:\Program Files\Unity\Hub\Editor\2019.4.13f1\Editor\Data\PlaybackEngines\AndroidPlayer
this AndroidPlayer folder in NDK, SDK, and OpenJDK these folders are important for APK file generation.
These files are not properly installed then these files copy for another unity version.
enter image description here
Only one version you have then re-download it.
Edit the environment variable like this path in your case path was different but make sour bin folder is important.
C:\Program Files\Unity\Hub\Editor\2019.4.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin
enter image description here
Solve the problem.
I solve the problem by changing the paths inside:
edit->preferences->external tools
To point to the correct version as I download a different version for the SDK, NDK and JDK when using the hub. This can be done by ticking the checkboxes.
As #Jelly Qwerty answered, installing android platform alone won't install jdk, sdk and ndk. What you got to do is:
Open Unity Hub
Go to "Installs"
Click on the 3 dots on the upper right corner of your unity installation and select "Add Modules" Unity Hub Settings 1
Expand "Android Build Support" and check "Android SDK & NDK Tools" and "OpenJDK". Unity Hub Settings 2
Once the tools are installed you should be able to build your apk.
Cheers
I unchecked and checked the box for "JDK installed with untity" in Preferences>Externals Tools.
A window popped up and it installed some files and it fixed my issue
In Unity hub navigate to your unity versions, in the desire version click the doted menu and select add modules, if you already have android support, it has other options to install the android skd, ndk, and open ndk
There is no 3 dots and there is no installing JDK, Gradle, SDK, or NDK.
I always get Gradle building errors when I install these components manually, although they are the compatible ones of my version.
I want to download them automatically by unity, but the options you are talking about don't exist.
enter image description here

Chilli Source Android build on windows

I've tried building the CSEmptyTemplate project in eclipse for android but have run into a host of issues with it.
Looking at the documentation, it doesn't appear as if it should be this difficult.
Firstly, I've installed cygwin and installed the devel package to get make.exe and gcc compilers. I'm also using cygwin as part of the tool chain.
However, the error I keep getting is 'make: *** No rule to make target `all'. Stop.'.
Any advice on fixing these issues would be appreciated.
edit: Found the make files. I was just an idiot last night when working on this.
There shouldn't be any additional steps required to build Chilli Source for android on windows, just the simple steps listed on the website here: http://chilli-source.chilli-works.com/docs/?page_id=67
However setting up the Android Development Tools with the NDK can be a bit of a pain. Judging by the error your getting my gut feeling is that something isn't set up correctly there.
Chilli Source requires the latest versions of the SDK, NDK and ADT. Can you ensure you have:
Android API level 21.
The latest versions of the Built Tools, Platform Build Tools and Google Play Services.
NDK revision 10c.
The latest ADT is also missing a couple of things that means it can't be used out of the box.
It doesn't come with the native dev tools which can be acquired by doing the following:
Go to "Help" then "Install New Software..."
Select "Android Developer Tools Update Site - https://dl.google.com/android/eclipse". You make have to edit it to instead point to https://dl-ssl.google.com/android/eclipse
In Developer Tools select and install Android Native Development Tools.
It also doesn't come with ant. This isn't causing your issue, but it will cause issues later on, so get it following these steps:
Go to "Help" then "Install New Software..."
Select "Juno - http://download.eclipse.org/releases/juno"
In General Purpose Tools select and install Eclipse Plug-in Development Environment.
Now that you've got everything required, ensure that you've got it set up correctly:
The correct version of the SDK selected the Android tab in preferences.
The correct version of the NDK selected in the Android/NDK tab in preferences.
Android 5.0 selected in the Android tab in Project Properties.
Finally, on windows you also need Cygwin. It's been a while since I've used it (I'm not a fan of cygwin so I do my Android development in a Ubuntu virtual machine) but only the "devel" package is needed iirc, so make sure you've at least got that.
Hopefully ensuring all of that is set up correctly will fix your problem!

Android Studio no installation wizard

I have downloaded the latest Android Studio and when I run studio64.exe it opens Android Studio as a standalone application, however I would like to install it to my system.
The website says there is an installation wizard however I get taken straight to the Android Studio start screen. Is there still a way to install it on a Windows machine?
Turns out that Android Studio is now portable - like Eclipse. In other words, there is no installing, you just get the zip file, which contains everything you need, such as the executables that run Android Studio. You'll need to store this folder somewhere relevant and create a shortcut to the studio(64).exe file to run it from desktop/start menu.
The SDK is also no longer bundled with Android Studio, so that will need to be downloaded separately.
As of this post the Android Studio installation instructions by Google are out of date.
you can get the sdk manager as stand alone installer.once installed you need to run it as "administrator", than only it will be able to download and install packages and api's. follow the given below link:
http://dl.google.com/android/installer_r23.0.2-windows.exe
Check if its in compatible mode with your OS version of your machine. Right click on the downloaded bundle > Move to properties> Compatibility tab> Select Compatibility tab> Tick the check-box- Run in Compatibility mode> Select your OS version from the drop down.
You will get the set up wizard :)
Worked for me :)

Eclipse is saying "Update Android Developer Toolkit"

I've somehow managed to mess up my Eclipse and Android set-up and I'm not sure how to fix it. The symptoms of the problem are as follows:
In Preferences > Android, I try to select the location of android-sdk-linux, when select the error appears "This Android SDK requires Android Developer Toolkit version 20.0.0 or above. Current version is 18.0.0.v201203301601-306762. Please update ADT to the latest version."
Going to Help > Check for Updates in Eclipse, returns no updates found
Going to Help > Install new software and selecting work with ADT Plugin - https://dl-ssl.google.com/android/eclipse/. Selecting Developer Tools and next, returns
Cannot complete the request. See the error log for details.
"Android DDMS" will be ignored because it is already installed.
"Android Development Tools" will be ignored because it is already installed.
"Android Hierarchy Viewer" will be ignored because it is already installed.
"Android Traceview" will be ignored because it is already installed.
"Tracer for OpenGL ES" will be ignored because it is already installed.
If I then take a look at what is already install, Android Development Tools is listed and the version is 20.0.0.v201206242043-391819
Now for the interesting part:
If I go to Help > About > Installation Details > Features is lists Android Development Toolkit as Version: 20.0.0.v201206242043-391819 but if I then go into Plug-ins it lists Android Development Toolkit as Version: 18.0.0...
Sorry for yet another question on updating the ADT as there already seem to be quite a lot of questions on the topic but I've tried the typically solutions and they does seem to be getting me very far
Some extra info, that people often ask for
OS: Ubuntu 12.04 LTS
Eclipse Platform: Version 3.7.2
In your installed folder of eclipse there is a folder named plugins.
Do the following:
Find the plugin file/folder of Andriod SDK and move it to some other folder for backup.
Download from Android site the latest version of Android SDK
Copy/paste it in your plugins folder
Restart eclipse
And everything should be fine.
Try using http://dl-ssl.google.com/android/eclipse/ instead of https://dl-ssl.google.com/android/eclipse/
In the end, I just couldn't fix it so I complete uninstalled it and set it back up again from scratch, thanks for your help
Run software updates in Eclipse (Help > Check for Updates) and update the ADT.
I know I'm late to the game on this one, but I figured I would contribute since I ran into the same problem myself. In order to check for installed plugins in Eclipse, do the following.
From the Eclipse Preferences Menu..
-Select "Install/Update"
-From the General Menu, There should be a link button that says "Uninstall or Update"
This should take you to a prompt that will allow you to uninstall anything you've added onto your Eclipse setup!
Go to the below site
https://developer.android.com/sdk/installing/installing-adt.html
and download ADT-22.3.0.zip from the site.
then follow the procedures mentioned there..
uncheck "Contact all update sites during install to find required software"
see: Can not install Android ADT 21.1 on eclipse Juno (Windows 7) after upadate to SDK 21.1
After updating the Android SDK Tools to the latest version from the SDK manager, do the following:
Go to Eclipse->Help->Install new software
Type https://dl-ssl.google.com/android/eclipse/ in the "Work with" Text box
From the list, select all and then click next
Now Eclipse will prompt you that in order to install these new software, Eclipse will uninstall the old version (in this case Android Developer Tools), click on next, read and accept the license and wait for it to download
Restart Eclipse and everything should be working fine.

DDMS Files Not Found Android\platform-tools\adb.exe

I have Eclipse and Java SE and am running Windows XP and am trying to setup Android for Eclipse.
I first:
Visit http://developer.android.com.
2. On the main page that appears, click the link to download the Android SDK.
3. Find a link appropriate to your operating system (Windows, Mac OS X, or Linux).
4. Click the link to begin the download.
I installed the Android SDK Tools
I then installed ADT as followed ( note I used http instead of https ) under downloading the ADT plugin.
http://developer.android.com/sdk/installing/installing-adt.html
It gave me some errors saying that somethings needed to be installed which would have been installed if i'd installed Java EE.
I saw a site that said go into the SDK Manager, so I tried installing somethind and it gave me this error:
[2012-06-28 14:32:27 - DDMS] DDMS files not found: K:\Android\platform-tools\adb.exe
[2012-06-28 14:32:27 - DDMS] DDMS files not found: K:\Android\platform-tools\adb.exe
What does this mean, and how can I get Android to work. Do I still need some thigns that Java EE has for Android?
I hate to say it, but restart Eclipse. My recent install gets confused sometimes and that's how I fix it. Hasn't failed to correct it yet.
The file path is wrong. You probably renamed a file in the directory after you installed Eclipse, and now you have to change the file path manually or re-install the program. That's why in the instructions, you are asked to install to developer on your main drive, and not some other file.
After moving eclipse to another drive I experienced this problem. Fix it by setting the SDK folder at Eclipse > Window > Preferences > Android > SDK Location:
Changing the Drive letter from C to E fixed this for me. Locate your eclipse folder on your drive and correct the path or use the browse button.
The path for me was E:\adt-bundle-windows-x86_64-20140702\sdk
Shutdown any other app that might be connecting to the phone via adb.exe eg. Visual Studio using android sdk.
Restart eclipse if needed.
install the installer from http://developer.android.com/sdk/installing/index.html?pkg=tools andriod intaller it will be all right
Set your SDK path in Preferences (Eclipse > Window > Preferences > Android > SDK Location:)

Categories

Resources