Cannot create a new Android Project using Eclipse - android

I recently updated my sdk version from 18 to 20.
I tried to create a new Android Application Project.
I filled up all the needed fields to create a new project but when I came to the last page of the creating a new Android Application Project, this appears:
"
This templates depends on the Android support library, which is either not installed, or the template depends on a more recent version than the one you have installed.
Required version: 8
Installed version: Not installed
"
Then it also displays this link.
http://developer.android.com/sdk/compatibility-library.html
It also has two buttons:
Install/Upgrade
Check again
When I click the first button, it's not downloading, installing or upgrading any of my software. And this messages display to my Console:
[2012-07-15 21:55:08 - SDK Manager] Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
[2012-07-15 21:55:16 - SDK Manager] Fetched Add-ons List successfully
[2012-07-15 21:55:16 - SDK Manager] Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
[2012-07-15 21:55:37 - SDK Manager] Done loading packages.
[2012-07-15 21:55:37 - Android Compatibility JAR not found:] D:\Software\Eclipse\v4\android-support-v4.jar
The button two does not do anything at all.
I downloaded the compressed file 'android-sdk_r20-windows' and extracted it to my hard drive. I used it to download the following:
Android SDK Tools
Android SDK Platform-tools
SDK Platform API8
Google APIs 8
I don't understand what my problem is, my eclipse works properly when I still haven't updated it yet. Did I forget do download some required tools or something?
Please help me.
Add: My eclipse works fine when I imported my previous Android Applications (my app runs on my emulator), the only problem is that I can't create a new Android Application.

I struggled with this for about an hour today and it started working. I think the key was to uninstall and reinstall the support library, then restart eclipse.
Note: I had to restart eclipse twice, after uninstalling the support library from within the SDK manager. Manually deleting the folder form terminal did not work for me.

Open SDK Manager.exe within the Android SDK r20 that you downloaded. In the list of software, scroll down to Extras at the bottom, and choose Android Support Library.

Step 1:
Open Android SDK Manager. In the list of software, scroll down to Extras at the bottom >> and choose Android Support Library >> Delete Package >> Delete complete restart eclipse
Step 2:
Open Android SDK Manager. In the list of software, scroll down to Extras at the bottom >> and choose Android Support Library >> InstallPackage >> Installl complete restart eclipse >> Done

Possible duplicate here. This is strange but works.
Go the SDK_Folder/extra/android and rename the folder compatibility to support. After that, restart the Eclipse.

Following steps worked for me:
Goto Help > check for updates > Select Android Tools Development and install it
Restart Eclipse
Eclipse asked me to update Android SDK Tool. I clicked on ok
Android SDK Manager opened and I selected the options to install and update.
After finishing, I restarted eclipse and created new android project.

Delete the Android Support Library from Extras-Android support Library..Then install it again..later you will be able to create new projects

Workaround that worked for me:
- Delete the support library from the SDK manager
- Create a new project & install the support library by clicking on "Install / Upgrade"

In fact I think there is a bug with the Text icon creator. Every time i try this it does not create the project properly even after doing all the re-installs as suggested by the other posts.

I was having this problem on one machine, when logged on with an account with limited admin privileges. I had set up the proxy details in the SDK Manager options menu and set it to force http instead of https. The extras folder was coming up empty.
In the log I had a message saying that it failed to download "https://dl-ssl.google.com/android/repository/addons_list-2.xml" as the file was not found. I then went to tools->manage addon sites, then under user defined sites I added the URL "https://dl-ssl.google.com/android/repository/addon.xml" (Different from the file mentioned in the log but it seemed to work). When I exited that dialog it updated the list and the extras folder was now populated with items including the Android Support Library.

i had some problem. So for resolve this problem I change folder tools (adt-bundle-windows-x86_64-20130911\sdk\tools) by http://dl-ssl.google.com/android/repository/tools_r22-windows.zip

Related

Location of android SDK has not been setup in preferences

I am getting this error:
I have installed ADT and SDK using install new software in Eclipse. I am using Eclipse Java EE IDE for Web Developers. Version: Kepler Service Release 2.
I used this link https://dl-ssl.google.com/android/eclipse/
I do not know where the SDK is getting installed as it being done through Eclipse. Which path should I provide to remove this error. Actually I cannot even set a path as the OK button in preferences window remains disabled.
What can be the issue.
I know this has be address earlier but could not get what I am looking for hence added a new thread.
I do not know where the SDK is getting installed as it being done through Eclipse.
Not if you installed the ADT plugin separately. You need to download and install the Android SDK (see "SDK Tools Only"), then teach the ADT plugin where you installed it.
Also note that support for the ADT Plugin has been officially discontinued by Google.
Choose Window>preferences>Android
In the SDK location Text Box you need to browse the location of Android SDK, to let eclipse know where the android SDK is, and same for the ADT by chhosing HELP>Install new Software...
I had faced same problem and get solution....
In Eclipse go to Help
Install New Software ---> Add
Inside Add Repository write the Name: ADT (or, as you want)
and Location: https://dl-ssl.google.com/android/eclipse/
after loading some time you will get Developer Tools.
check Developer Tool
click Next
Finish
Your problem will solved.
I have deleted folder .android in my user folder (c:/users/xyz/.android) and relaunched Eclipse - dialog box "Android SDK installation" (not exact name) has came up - then install of SDK.

Sdk Manager not opening from eclipse

SDK Manager is not opening from eclipse. An initialization screen comes but the SDK Manager doesn't open. I have tried renaming android.bat file but that doesnt work. Re-installing has also been tried.
The possible reason for this to happen is you might have installed the plugin in a wrong way or the destination of the file might have changed by some means.
Make sure these 2 are correct on the 1st place.
If you are confident about these 2 are proper. Make sure the actual SDK_Manager.exe runs directly from its folder destination if double clicked.
which will be present in your android SDK path--->\Android\android-sdk\SDK Manager.exe
Open android.bat in sdk/tools folder by right click on it and click edit
find the line-
set java_exe=
edit it to your path to java.exe like
set java_exe=C:\Program Files\Java\jre7\bin\java.exe
then delete the next line which is
call lib\find_java.bat
This one worked for me......
Check out this link......
After 2 days of frustration not getting solution to launch SDK Manager manually and in Eclipse. Finally, I figured out the solution and whatever solution available elsewhere is not correct on recent development. Thought of adding this info of Android SDK for new to mobile testing enthusiast:
Android encourages users to use Android IDE, so you don't find Android ADT bundle zip file in the site. You may need to download from untrusted source if you want to configure SDK to Eclipse manually.
Solution:
Download JDK, install it, set environment variables for JDK and JRE in your system. (if not sure, please see videos of how to install JDK)
Download Eclipse, unzip it and launch Eclipse
In Eclipse, Go to Windows and click Install new software
Enter this url in work-with: https://dl-ssl.google.com/android/eclipse/ and press Enter
Select Developer Tools checkbox and click Next and finish
Click Ok for permission in popup
Click OK to restart Eclipse
Click Cancel in setting SDK in preferences
Parallely, Android Installation Tool windows opens up, click next
Select automatically downloading Android SDK tools and api versions
It downloads all required tool, it restarts the eclipse, sets preferences,
Now you can launch SDK Manager from Eclipse or go to SDK tools folder and launch Android in tools folder.
The reason of this is using newer version of android sdk tools.
Eclipse supports sdk tools version 25.2.5 and build-tools version 25.0.3. The reason is google has removed some optional/deprecated tools from sdk tools in release 25.3.0. But eclipse needs them to work with android projects. So the thing you can do is delete tools folder from your sdk and download eclipse supported version
Android SDK Tools:
https://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip
https://dl-ssl.google.com/android/repository/tools_r25.2.5-linux.zip
https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip
Extract them in your sdk installation directory.
You can now access to SDK manager by using the android command, which is located in tools directory of your sdk. You can also do this from eclipse.
Note that Eclipse supports build-tools version 25.0.3 and older, so you will have to download them. For other tools you can select latest version. They are supported by eclipse.

Android Studio SDK Managed Disabled

I just downloaded the Android Studio .dmg for OSX. Per the installation instructions, I've dragged it to the application folder and launched the application.
But the SDK Manager and AVD Manager are greyed out and are impossible to use.
Any ideas on an installation step I may have missed?
For people coming for this same problem for Windows: you won't have an Android SDK anywhere if it is your first time with Android. Also, here the Android Studio doesn't come with a packed SDK Manager, so you need to download one.
So this is what you may do:
Download the SDK Manager and an Android SDK
Download the SDK Manager from: http://developer.android.com/sdk/. Use the link that says "Get the SDK for an existing IDE".
Execute the downloaded installer.
Execute this program with administrator rights: SDK Manager.exe
Download the proposed SDK (if you get errors regarding the SDK Manager couldn't create some folders, remember it should be executed as administrator).
Configure Android Studio to work with the new SDK
Open Android Studio and in the Quick Start window click "Configure", you will see the SDK Manager greyed out.
Go to "Project Defaults", then to "Project Structure" and there it will ask for the path where you installed the SDK.
If you click OK and go back you will see the SDK Manager is no longer greyed out, and now you can start creating projects.
A project needs to have been loaded at least once for the link to become available.
Found it in :
File / Project Structure...
Then in "Android SDK" provide the path to the SDK folder inside the Android Studio Application Bundle.
Then Make a new project.
Then after the initial setup the elements where finally enabled.
Android Studio Beta v0.8.14 with the Android SDK for Mac does not appear to include the SDK: you need to install the SDK manually (e.g. https://developer.android.com/sdk/installing/index.html?pkg=tools) and then configure Android Studio to find and use it.
(I ended up using the ADT bundle, since I couldn't seem to find the SDK as a standalone download.)
You need to use the buttons on the welcome dialog, and not on the applications menu bar or preferences (as I had initially thought). Step by step:
(Note that "SDK Manager" is greyed out until you complete this, at which point you cannot undo it for the purposes of taking screenshots...)
Navigate back and the "SDK Manager" button on the "Configure" panel should be enabled. Clicking it should display something like this:
I had a similar problem and the cause was that I've used path with a space in it. There was a warning in the window that can cause problems with NDK, but in fact it caused problems with Android Studio internal SDK as well. After changing the path it works fine.
Go to configure -> project defaults -> project structure
give the path for the SDK and press OK.
It should work now
For Mac Users (Android Studio Beta v0.8.14)
The SDK or SDK manager is not included with this version of Android Studio, and the documentation is obfuscated regarding this change at this point.
Download the standalone SDK from here. You may select the latest revision of the same from this link below the title GET THE SDK FOR AN EXISTING IDE.
Extract the downloaded zip, and rename the folder as sdk
Copy the sdk folder into the Android Studio.app/Contents directory
Restart Android Studio and you will be shown this dialog when the Android Studio starts up
To remove grey out area,
you need to follow this steps as below:
Go to File
Click on Project Structure
Go to SDK Location
Click on Browse to find SDK path
Select proper SDK path on your system
Now click on SDK manager icon on Android Studio toolbar
I hope this solves the problem of grey out area.
Thanks,
This will no longer be a problem when version 1.0 is released. In the meanwhile you can download the latest canary build (1.0 RC2), which downloads the SDK during the setup.
For me, the issue was on windows and it was as simple as launching the installer with "administrative" mode. That's it!

How do you add an SDK to Android Studio?

I'm using Google's Android Studio 0.1 based on IntelliJ, and I cannot figure out how to add additional SDKs to my project.
I exported my existing project from Eclipse to a Gradle project, which I imported into Android Studio, as recommended by Google.
My project's SDK is Google APIs 2.3.3. However, I use a library called PullToRefresh which appears to need SDK 4.1, so I'm trying to add the SDK 16 to my project.
I've already made sure to download the SDK using the SDK manager. These SDKs are added to the Android Studio.app's sdk folder automatically.
I opened the Project Structure window, clicked "SDKs" under Platform Settings, and I currently see JDK 1.7 and Google APIs 2.3.3 shown. I click the + sign above that list to add a new SDK. I then navigate to the sdk directory that has android-16, as shown in the screenshot below. I am not quite sure what this wants me to add, but I've highlighted the android-16 folder (about the only thing I can select), and when I click "Choose," the window disappears, but no new SDK appears in the SDK list.
And here is a screenshot of my SDK Manager view, showing the installed SDKs:
I had opened a ticket also with Google's support, and received the solution. Instead of choosing the sdk/platform/android-16 folder, if you select the top-level "sdk" folder instead, you'll then be asked to choose which SDK you want to add. This worked!
You have to put your SDK's in a given directory or .app directory. You have to do it in finder while you are out of the application i'm assuming, but personally I'd use terminal in Mac instead of doing it in the App itself or finder. According to Google:
On Windows and Mac, the individual tools and other SDK packages are saved within the Android Studio application directory. To access the tools directly, use a terminal to navigate into the application and locate the sdk/ directory. For example:
Windows: \Users\<user>\AppData\Local\Android\android-studio\sdk\
Mac: /Applications/Android\ Studio.app/sdk/
You can change from the "build.gradle" file the line:
compileSdkVersion 18
to the sdk that you want to be used.
I had to restart Android Studio for changing the sdk after installing a new one. Then Android Studio asked me for configuring my SDK and let me do it.
And For linux(ubuntu)
/usr/share/android-studio/data/sdk
Download your sdk file, go to Android studio: File->New->Import Module
I followed almost the same instructions by #Mason G. Zhwiti , but had to instead navigate to this folder to find the SDK:
/Users/{my-username}/Library/Android/sdk
I'm using Android Studio v1.2.2 on Mac OS
For those starting with an existing IDEA installation (IDEA 15 in my case) to which they're adding the Android SDK (and not starting formally speaking with Android Studio), ...
Download (just) the SDK to your filesystem (somewhere convenient to you; it doesn't matter where).
When creating your first project and you get to the Project SDK: bit (or adding the Android SDK ahead of time as you wish), navigate (New) to the root of what you exploded into the filesystem as suggested by some of the other answers here.
At that point you'll get a tiny dialog to confirm with:
Java SDK: 1.7 (e.g.)
Build target: Android 6.0 (e.g.)
You can click OK whereupon you'll see what you did as an option in the Project SDK: drop-down, e.g.:
Android API 23 Platform (java version "1.7.0_67")

Android SDK failed to install

I saw a good tutorial on youtube to install the Android SDK on windows, i attempted it on my window 7 pc. I tried many times but still i failed. I have java JDK and Eclipse latest version installed but the only problem is that Android SDK didn't able to fetch some packages and i am unable to use it. The following error occurs:
How to deal with this problem? I want to learn and develop Android apps.
Try to remove everything related to Android and Java SDK as well as Eclipse. Try to install as follows:
Download and install JDK (java)
Download and install Eclipse
Download and install Android SDK
While downloading Android SDK try to do some if it does not fetch the files go to the Tools -> options -> and there checked Force https ok!
You can also download the ADT plugin and add it through Eclipse.
I think it will work fine. Go to this link which has whole latest SDK and installation ideas.
If i told you whatever follow the same patter and you will get it.
If you don't succeed in getting your SDK installed then I say you try to repair your computer by installing the fresh copy of Window 7 OS and try to choose English language this time.
First of all :
uninstal android SDK then check to remove any traces folder related to android and remove it manually from Program Files folder and from Documents and Settings folder ,
then uninstall java JDK also and eclipse ,
( which mean clean your computer from any thing related to android development preparation ) ,
now start again as follow :
1- Download latest java from this link : http://jdk7.java.net/download.html
then install it .
2- download latest android SDK from this link: http://developer.android.com/sdk/index.html
then install it , once finish install dont run it .
3- download latest eclipse from this link : http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junor
copy zip file to C folder and extract it in C folder it self ,
RUN ECLIPSE THEN :
1-Downloading the ADT Plugin :
a) Start Eclipse, then select Help > Install New Software.
b) Click Add, in the top-right corner:
In the Add Repository dialog that appears write this
for the Name : ADT Plugin,
and the following URL for the Location:http://dl-ssl.google.com/android/eclipse/
Then Click OK.
d) in the software dialog, select the checkbox next to
developer tools and clicks next.
e) in the next window, you will see a list of the tools to download ,
click next.
f) Read and accept the license agreements, click Finish.
H) When the installation completes, restart Eclipse.
2- Select Window > Preferences... to open the Preferences panel
a) Select Android from the left panel.
b) For the SDK Location in the main panel
click browse… and locate your downloaded SDK directory
then Click Apply, then OK.
3-open in eclipse: window then Android SDK manger and download any platform you want to start development with it .
some times maybe due to busy server of android site it gave error then later time it will fetch all download package you predetermined and download it succesfully .
hope this help .
Instead of the video tutorial, try this official tutorial:
http://developer.android.com/sdk/installing.html
It mentions about the alternate links also from where you can update the sdk.
Edit:
If you are still facing the problem, you can try this hack instead. You'd need another PC for that. What I can tell you that there must be some problem in your PC, so try downloading the required packages on any other PC. (Though you can still work with basic package, if you just want to learn and no to target a specific Android OS version).
After downloading, just go to the android SDK folder on the second PC, copy it in a pen drive and just paste the folder on your existing installation.
I always do this hack whenever I need to install the SDK on a PC without any internet connection and voila!! It works every time. Let me know if it worked for you or not.
I faced similar problem during the installation of SDK on my PC.
Start SDK manager from All programs and try to install APIS.I guess you are trying to install these from Eclipse SDK manager button.Starting SDk Manager from your Eclipse cause this problem. Both are same. But it worked for me.
You could try removing what you have and starting again from the beginning. I'm also on Windows 7, and I highly recommend downloading the zip file (not the installer) for the SDK and extracting it to C:\. It should automatically create a folder named "android-sdk-windows" but you can rename it if you wish. Then run the SDK Manager and start downloading packages. It may help to babysit the package downloader and jiggle your mouse every minute or so (yes, that sounds silly, but it actually made a difference for me because the downloads kept stopping partway through when I didn't do anything).
Try this.
Tools -> options -> check Force https ...
Download the latest sdk from http://developer.android.com/sdk/index.html and try again ! It should not appear again for sure.
are you running the sdk manager from administrator?? If not , right click on your SDK Manager and select Run as Administrator.. May be that will help...
For me the SDK was very tricky, too. It didn't get all the packages and downloaded very slow (about 15-20 kbps with 24 Mbps connection). Then I tried to run the program with administrator privileges and it fixed the problems.
Make sure Android SDK, JDK, and Eclipse are all either 64 bit or 32 bit. If one is different (e.g. Eclipse is 32-bit while the others are 64-bit), you will get errors.
Setup your Android Environment in easy way.
Required Files:
Java Development Kit (JDK) Download
Eclipse – Eclipse 3.6.1 or Helios is the version I’m using. Download
Android Development Tools (ADT) Plugin – custom plugin so we can build Android applications using Eclipse IDE. Download
Android SDK Starter Package – includes the core SDK Tools. Download
Android SDK Tools, revision 10 – the complete tools component of the SDK. Download
Android SDK Platform-tools, revision 3 – platform tools component of the SDK. Download
Android SDK Platform – our target Android OS.
Android SDK Platform:
[Android SDK Platform 3.0, revision 1 (Honeycomb)] : https://dl-ssl.google.com/android/repository/android-3.0_r01-linux.zip
[Android SDK Samples for Android API 11, revision 1] : https://dl-ssl.google.com/android/repository/samples-3.0_r01-linux.zip
[Android SDK Platform 2.3.3._r1 (Gingerbread)] : http://dl-ssl.google.com/android/repository/android-2.3.3_r01-linux.zip
[Android SDK Samples for Android API 10, revision 1] : http://dl-ssl.google.com/android/repository/samples-2.3.3_r01-linux.zip
[Android SDK Platform 2.2_r1 (Froyo)] : http://dl-ssl.google.com/android/repository/android-2.2_r02-linux.zip
[Android SDK Samples for Android API 8, revision 1] : http://dl-ssl.google.com/android/repository/samples-2.2_r01-linux.zip
STEPS:
Install the JDK using the default setup.
On your Android developer folder (ex. C:\Developers\Android) place all the zip files you just downloaded.
Create a workspace folder on your home folder (ex. C:\Developers\Android\workspace).
Unzip the Android SDK Starter Package (android-sdk_r10-windows.zip). NOTE: I suggest to use WinRAR so we can just right-click the zip file and then choose Extract Here
We now have the android-sdk-windows folder on our android developer folder. Inside this folder, delete the tools folder. Move the Android SDK Tools (tools_r10-windows.zip) and Android SDK Platform-tools (platform-tools_r03-windows.zip) zip files to this folder. Unzip them and rename as tools andplatform-tools respectively.
Inside android-sdk-windows folder there’s a platforms folder. Move and unzip the Android SDK Platform file (android-2.3.3_r01-linux.zip) on this folder.
Inside android-sdk-windows folder, create samples folder. Move and unzip the Android SDK Samples zip file (samples-2.3.3_r01-linux.zip) to this folder.
Unzip the Eclipse file (eclipse-SDK-3.6.1-win32-x86_64.zip).
Inside eclipse folder, run eclipse.exe. It will ask for the workspace folder to use. Choose the workspace folder you created. You can optionally check theUse this as the default and do not ask again checkbox and then click OK.
Still on Eclipse, select Help > Install New Software…. Click Add, in the top-right corner and then click Archive… Browse and select the downloaded ADT zip file (ADT-10.0.0.zip). Enter a name for this update site (ex. ADT Plugin) in the Name field and then click OK.
Check the Developer Tools checkbox or click the Select All button and then click Next button and then accept the defaults. (Sorry, you need to be online as some component need to be downloaded at this part. I’ll update it once I know how to do the offline mode of it). After the installation, Eclipse should be restarted.
On Eclipse, select Window > Preferences. Select Android on the left pane. On SDK location, browse the select the Android SDK folder (android-sdk-windows) then click Apply.
Still on Eclipse, select Windows > Android SDK and AVD Manager. Click the Installed Packages on the left pane and you will notice, there’s SDK Platform Android 2.3.3, API 10, revision 1 and Samples for SDK API 10, revision 1. We are now ready to create virtual devices.
Click Virtual Devices on the left pane. Click New button and give the virtual device a name (ex. Gingerbread). Select Android 2.3.3 API Level 10. Type 512 or more for SD Card size and then click Create AVD button. We are now ready to create our famous “Hello World” application.

Categories

Resources