Eclipse cannot find Android Support Library - android

I am an experienced programmer but new to Android, hence using Eclipse for the first time.
Unfortunately I cannot get my first project off the ground. I get as far trying to create the project when the following sequence happens.
A screen arrives titled 'Install Dependencies' telling me that the required version is 8 and the installed version is 'Not installed'
I click on the Install/Upgrade button and something must happen because Android SDK Manager pops up and I get a whole series of 'Fetching:' messages.
The next screen asks me to Choose Package to Install and the only option is Android Support Library, revision 10. This doesn't bother me as I presume 10 is better than 8 so I hit the Install button.
This is where it all goes wrong as I get a red message saying:-
File not found:C:\Program Files (X86)\Android\android-sdk\temp\support_r10.zip (Acces is denied).
Sure enough, when I check this folder, it is empty.
Now, something must have happened as as SDK Manager did a whole lot of fetching and must have put these files somewhere.
I am quite happy to find them and put them in the correct folder but the question is
What is the name of the files that I am looking for?

Run SDK Manager as administrator and then install Android Support Library from Extras

Download the sdk manager seperately and install files from there. put it in a place which is accessible to you and then point your eclipse android directory to it. tools>options>android sdk

Run eclipse as Administrator. This is the solution.

Try running your application (Eclipse) in Admin Mode.
Right click on the Eclipse app, and choose "Run as Administrator"
This will fix your problem.

properties >java build path >click library tab > add jars > add jars from the support library.

Related

Android-studio Selected directory is not valid home for Android SDK

I installed android studio but while selecting android SDK I am getting following error. I tried solution which is on this post but no luck. How can I solve this?
I had this problem, select SDK folder (NOT SDK->sources or SDK-platforms)
I resolved with the instructions here,
http://www.blog.teamguru.in/2018/04/06/selected-directory-is-not-a-valid-home-for-sdk/
Just close current error window and let run the android studio
Open the SDK manager as shown below
Click on Edit SDK location as shown below
Simply press next button if there is correct location for SDK you want to install there
Let it be downloaded
Install platform and SDK tools and
Enjoy
Try restarting the application. Close all related studio processes, then right click "run as administrator".
You should be fine after this.
I got the same issue. You must enable the Android Support Plugin
Configuration > Plugin > Android Support Plugin. Check it.
Close error window
Go to gradle tab
select "Gradle settings", wrench icon
Search for SDK setup
Select appropriate sdk for your device.
Next, two times
Wait for install
There is all..
None of the other answers work. After the installation, immediately close Android Studio, then start it as administrator. A message might popup asking for the sdk manager location. Ignore it (Close the popup). Go to Tools > SDK Manager and click on the edit button on the right of Android SDK Location. Then click Next, next and you're good to go. Android Studio will let you install the sdk manager.
I had the same problem but what I found is that it requires the parent folder of the following things AVD manager,SDK manager,tools,platform-tools,build-tools etc.So what you need is to find the parent directory of these things, which you might find with a name such as android-sdk or android-sdk-windows(in case you are using windows OS).Make sure the above said contents are in that folder and select it.I hope you will find this useful.
Download the SDK from http://developer.android.com/sdk/index.html
Start SDK manager and make everything up to date
Also, make sure you have set the language level to
7.0 Diamonds, ARM, Multi-catch, etc
I had this problem on Linux. Apparently you need write access to some place in that directory, so I just took ownership of the entire thing:
sudo chown -R thomas:thomas /opt/android-sdk
Could be that something similar is going on on Windows as well.
If like me, a MacOs user which has installed Android Studio on my Mac and if you've tried everything you can think of but was still unable to set the Android SDK directory in Android Studio, follow the next steps (I know the site where I got the bundle is a freeware site but the package is the right one):
1. Download adt-bundle-mac (Android Developer Tools) from [here][1].
2. Unzip the file and browse into the unzipped folder.
3. Copy only the sdk dir to /Users/username/Library/Android
4. Open Android Studio, the error about the SDK folder which is not set will pop up, set the path to the SDK to "/Users/username/Library/Android/sdk".
5. Now Android Studio will accept the path and you're good to go.
I wasted about 2 hours until I fixed it so I hope that by writing this answer I'll save you some 2 hours.
The sdk folder contains the platform-tools folder.
I copied this folder and named it platforms, then it worked for me.
Just delete(preferably permanently) all the android directories in whatever location they are present(e.g. C:\Program Files\Android, C:\users\respective user\respective android folders). Remove the installer as well(if possible). Make sure to save all your Android Studio files in some external storage (preferably).
The main thing is to get Android studio with SDK.
Now go to the android studio website and install android studio leaving all settings default. There you will also get to install the SDK and it's linking.
It will take some time to load and will load nearly 1.5 GB files.
This worked for my case.
In my case I wasn't giving him admin permission
Steps to follow:
Close Android Studio.
Restart Android Studio and Give the path of Empty Folder .
Install Sdk in that folder(Sdk will automatically install and will get configure automatically.)
With Android Studio 4.1.2 the easiest thing is to close the project (file / close project). That's how you get to the wizard that automatically sets up the SDK for you.
The default location that it suggests is /Users/stan/Library/Android/sdk (exactly the same that I was trying to set up manually but AS kept saying it's invalid)

Cannot create new Android Projects in Eclipse

Using 3.6.2. When I choose to create a new Android Project, I enter a name, 'FirstProject' but the Finish button remains hollow and I cannot get past creating the project.
I did a little Google research and found a common cause of this is that the support folder that exists in the SDK's extras folder needs to be duplicated and the duplicate named to compatibility. I've done this now, and restarted Eclipse, but this still hasn't fixed the issue.
I also read that Juno causes this problem, but I'm not using Juno.
Has anyone experienced this problem before? Very eager to start an Android App!!
EDIT: A screen of the error:
You need to choose a Build SDK. If there is nothing in that drop-down, please visit the SDK Manager (Window > Android SDK Manager) and download one or more SDK platforms and associated emulators.
Make sure you add the SDK in Eclipse otherwise you will download them all and scratch your head on why they are not working.If you launch SDK manager form SDK folder and not from Eclipse it does not seem to register in Eclipse that you have downloaded these files. Took me several hours for something that should have taken only one or so.

Could not find folder 'tools' inside SDK

I am doing Android Development using Eclipse. I have downloaded all the required software, but I am having the same problem as discussed in "Unable to set up Android Target in Eclipse". Now I do not find the solution of the problem on that discussion so let me rewrite the problem again,
When I load Eclipse and create a new Android project, it keeps on waiting for the ADT to load. To figure out what is wrong I went to preferences and tried to put the location of the ADT I created in it but it keeps giving me this error when I put the address of ADT,
Could not find folder 'tools' inside SDK 'E:\Documents and
Settings\me\android-sdks'..
How can this issue be resolved?
I created the folder tools manually, now I am getting this error:
[2011-12-24 15:23:56 - DDMS] DDMS files not found: E:\Documents and Settings\me\android-sdks\platform-tools\adb.exe E:\Documents and Settings\me\android-sdks\tools\hprof-conv.exe E:\Documents and Settings\me\android-sdks\tools\traceview.bat
[2011-12-24 15:42:06 - DDMS] DDMS files not found: E:\Documents and Settings\me\.android\platform-tools\adb.exe E:\Documents and Settings\me\.android\tools\hprof-conv.exe E:\Documents and Settings\me\.android\tools\traceview.bat
If you install Eclipse properly then:
Start Eclipse
From the menu bar, select Window > Preferences > Android
For Android location, browse the folder in which you install Android SDKs.
In Android SDKs folder, rename the folder platforms-tools to tools.
Select the folder Android SDKs through Preferences dialog box.
If I get you correctly you have just downloaded Android sdk and want to configure it working with Eclipse. I think you miss one step from the installation of the sdk:
1) you download it
2) you extract it somewhere
3) then go to the specified directory and start AndroidManager (or was it just android??). There you specify you need platform-tools and the manager will configure that for you. This will also provide you with the 'adb' executable which is crucial for the Android developement.
After that you install ADT (which I think you already did) and from Eclipse preferences -> Android options you get a place to specify where your android-sdk is. If you specify it after you did the 'step 3' you should be good to go.
I am not 100% sure I got it correctly and what your state is, so please forgive me if my comment is irrelevant. If I am wrong I will be happy to help if you provide some more details.
Something I am completely sure is that you shouldn't need to create the folder 'tools' by yourself.
PS: The description I gave is for newer versions of android sdk, but if you are encountering a problem with older version I will recommend you to start from scratch with newer version. It shouldn't take you that long time.
This can also happen due to the bad unzipping process of SDK.It Happend to me.
Dont use inbuilt windows unzip process.
use WINRAR software for unzipping sdk
By default it looks for the SDK tools in "C:\Documents and Settings\user\android-sdks". Some times we install it at another location. So you just have to select the correct path and it will done.
I faced similar issue when the SDK tools installation was failed during the initial setup. To resolution is to download SDK tools from Android Developer Site
Expand "USE AN EXISTING IDE" section and download standalone SDK tools
Choose your destination as (%HOMEPATH%\android-sdks)
Now start Android-SDKs folder and run SDK manager
If you get the "Failed to find DDMS files..." do this:
Open eclipse
Open install new software
Click "Add..." -> type in (e.g.) "Android_over_HTTP" and in address put "http://dl-ssl.google.com/android/eclipse/".
Don't be alarmed that its not https, this helps to fetch stuff over http. This trick helped me to resolve the issue on MAC, I believe that this also should work on Windows / Linux
Hope this helps !
In my case i was using Ubuntu. Where the was two directories one was /android-sdks
and /android-sdk-linux. I used the second one it works for me :)
My solution was to remove the Eclipse ADT plugin via menu "Help > About Eclipse SDK > Installation Details". Eclipse will restart.
Next go to Menu "Help > Install New Software", then add the ADT plugin url "https://dl-ssl.google.com/android/eclipse" (or select the existing link from the dropdown).
This will re-install the latest ADT, including the DDMS files.
For me it was a simple case of specifying the path to the 'sdk' subfolder rather than the top level folder.
In my case I needed to input
/Users/Myusername/Documents/adt-bundle-mac-x86_64-20140321/sdk
instead of
/Users/Myusername/Documents/adt-bundle-mac-x86_64-20140321

Android SDK download with Eclipse, getting error message: Failed to create directory C:/

Why does this happen? It doesn't matter which package I pick, always the same error message:
Downloading Android SDK Platform-tools, revision 3
Failed to create directory C:\Program Files\Android\android-sdk\temp
Make sure you have writing permissions for that folder. Try starting Eclipse or the SDK Manager as Administrator.
You only have to run SDK Manager as Administrator, right click and select Run as Administrator.
If you put the Android SDK (or anything else) in Program Files, Windows will, by default, require Admin access to edit files in it. But you can change that by changing the folder permissions:
In Windows, right click on the android SDK folder, click Properties. Go to the Security tab, click Edit to change the permissions. Select normal Users and check the box to Allow Full control.
Then, applications that you launch as a normal user will be able to edit the SDK, such as to update it or compile libraries in it.
Please whether the directory C:\Program Files\Android\android-sdk\temp is already there. If there you see the temp folder then delete the temp folder and try again. It will be installed then.
You can also try installing Android outside of Program Files. I usually put it in C:\Android, then there are no permission issues.
Actually the folder /temp didn't exist for me, so I just created it and then all was fine.
Yes, after that you need to run android SDK as administrator to download the API/platforms.
If anything looks strange (like a list of incomplete names) no worry, close it, and reopen it after 10sec.
Run SDK Manager as Administrator, right click and select run as Administrator. It's one of the amazing things of W7, ;p

IntelliJ IDEA - Android JDK doesn't work

I've just installed IntelliJ IDEA 10.0.0.2 Community edition
I've installed Android SDK ... (C:\Program Files\Android\android-sdk-windows)
I want to make a new android project, so I a create a new project, select Android Module, next , next...
Then when i need to choose the JDK, I go to the android folder, and when i try to choose it, I get this error:
The selected directory is not a valid
home for JSDK
What am I doing wrong ? what can i do to fix this ?
I Installed android SDK with all the updates
When I choose IntelliJ IDEA Plugin SDK i get:
The selected directory is not a valid
home for IntelliJ IDEA Plugin SDK
EDIT:
Still not solved...
I've already chose the SDK itself and chose android 2.2 Platform when creating the project.
Can't load the JDK files. So i won't me compile, i get this error
Cannot start compiler: the SDK is not
specified for module "blah".
Specify the SDK at Project Structure
dialog.
To develop Android applications in IntelliJ IDEA you need to set both Java SDK (JSDK) and Android SDK:
Configuring Project SDK
Java SDK
Setting Android SDK/Platform
You also need to run SDK Manager application and download Android platforms which you are going to use.
Note that you can detach all the jars from the JSDK configuration in IDEA if you are going to use it only for Android, this will help with the code completion so that only classes available in Android will be suggested by the IDE.
I also recommend to read the following tutorials:
Developing applications for Android in IntelliJ IDEA
Developing Android applications on the base of existing sources
EDIT:
Configuring project's link has been updated
JSDK is the Java SDK. On my Debian it's under /usr/lib/jvm/java-6-sun
My installation path was "C:\Users\User\AppData\Local\Android\android-sdk." That confused IDEA since it doesn't seem to be able to see hidden folders, even when typing in the full path. Bummer...I fixed it though, by setting AppData as visible.
I just wasted a whole lot of time on this problem. My work station is running IntelliJ Ultimate 11 on Windows 7 64-bit. I was setting up my first Android project. Therefore, no SDKs were configured. First I selected the JDK, which was a no-brainer (C:\ProgramFiles (x86)\Java\jdk1.6.0_30). Next comes the part where you need to specify the Android SDK. First you click the elipsis ("...") and then click "Add New". Now here's the kicker... If you look carefully at the dialog box, you'll notice that "Configure new JSDK" is highlighted by default. What you need to do is change the selection to "Android SDK". Now you can select the directory of your Android SDK and you won't get that stupid error message.
I literally wasted about a half an hour before I realized why the app kept telling me "This is not a valid SDK directory." Hopefully this will help someone else having the same problem.
Don here: I had the same trouble in Windows 64 with 11.1.2 and 64bit java. found that only by clicking on the left window could I register my Android SDK.
When you first create Android project/module, you must choose JDK, for this click "+" and select "JSDK" in menu, then select where your Java SDK is, for instance "c:\Program Files\Java\jdk1.6.0_20". Then click "Next" and in "SDK Properties" panel click "New" and select path to your Android SDK (a directory where "SDK Manager.exe" is).
Click the + symbol in the left most pane in the Select android sdk window during the creation of the project and then select the android SDK (default= c/program files/android/android-sdk)
I had a real hard time seeing how to do this on a mac, since you can't download the jdk from sun's site
#Szabolcs Berecz #Yochai On a mac, you'll need to get the source as described here:
or just jump to the download here:
Then it stored in this location:
1.6.x /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/src.jar
If you right click in the leftmost window you can create a new Android Plugin or some such. I was just fighting with this myself. I have never used IntelliJ before and really their docs are out of date. Apparently not up to the current version.
In the JDK part you need to choose the JAVA JDK that was downloaded. (not the android)
C:\Program Files\Java\jdk1.6.0_24\
Make sure you have installed JDK 1.5 or 1.6
(1.7 is not works for some reason with Android SDK).
I had the same problem ("The selected directory is not a valid home for Android SDK"),
but after installing 1.6 JSDK - it`s work for me.
I've got the same problem with version 12 on linux, Android module does not show java sdk location and android sdk location selection fails because java sdk is not set.
I've solved by making a java project, that lets me select java sdk and android sdk (strange right?), after making such a project I can make an android project because android sdk is now configured
I've spent 30 minutes solving a foolish problem
For IntelliJ & Android on Linux.
If the "Android SDK" Menu comes up with a red 'No Android SDK' Click the browse button to the RIGHT of the drop down. - Its a different layout in Linux to Windows.
In my case, I needed to add support for android, so, I searched for android in the plugins settings.
Fixed! I needed to run IntelliJ as Administrator IDEA. Now it will approve my Android SDK directory of "C:\Program Files (x86)\Android\android-sdk"

Categories

Resources