I have been learning Android programming using Android Studio (v22.6.2-1085508), today suddenly Android Studio is asking SDK location.
I checked Android Studio -> Windows -> Preferences -> Android
SDK Location is empty.
Browse and tried -
c:\Program Files\java\jdk1.7.0_67
c:\Program Files\java\jre7
c:\Program Files(x85)\java\jre7
But looks not right.
I am not sure if it related to my recent update of java download?
If it asks for SDK location it is most likely the Android SDK you need to provide (which is the top level directory of your Android SDK installation, containing platorm-tools, samples, etc.), not the Java JDK. The JDK would have its own location on the same window though.
If you also need to provide the JDK path, if you have JDK 7 installed at c:\Program Files\java\jdk1.7.0_67, you can provide that path there.
My configuration (File -> Project Structure... -> SDK Location):
Related
I just restarted my Windows 10 machine to install some updates, and afterward I started getting this error in Visual Studio:
Error Xamarin.Android for Visual Studio requires Android SDK.
Please install it or set Android SDK path on Tools->Options->Xamarin->Android Settings menu. 0
Which I thought was weird, since I'd never run into any issues with my Android SDK before. So I went to Tools->Android to open the SDK manager, but all the options were grayed out and not selectable. Here's a screenshot:
So I did a little research, and this post told me to manually start my SDK manager with the .exe file. So I searched my files for the SDK manager, but when I clicked to open it, I got this error message:
The item that this shortcut refers to has been changed or moved.
Would you like to remove this shortcut?
And I got the same error for the Uninstall Android SDK Tools and AVD Manager shortcuts. So it seems that all my Android SDK files were for some reason deleted during my Windows updates.
Then I noticed that under Visual Studio Tools->Options->Xamarin->Android, the "Android SDK Location" was empty. Screenshot:
So then I downloaded Android Studio from the official site, found the location to the .exe file, and then copy-and-pasted the path into the "Android SDK Location" field, and clicked "OK". But the field wasn't saved. No matter what I do, when I open Options, the "Android SDK Location" field is always empty.
I have no idea how to proceed. Anyone have any ideas?
UPDATE
I ran Visual Studio Installer, clicked Modify, and under "Individual Components", it tells me that I already have the latest Android SDK setup (API level 25) installed. Do I need to install something other than that? Screenshot:
Better to Update Visual studio from Visual studio Installer
When you Load Visual Studio Installer, select repair option...
it will fix all issues...
First, Android SDK Location path is Android SDK path not .exe file path.
Second, check the path C:\Program Files (x86)\Android\android-sdk which is default path to store Android SDK by Visual Studio to see whether it exists. In my computer like this:
If it doesn't exists, it maybe have been deleted by your computer update process.
Why the "Android SDK Location" field is always empty is because the path is wrong.
You can also get Android SDK path with the Android Studio which you have downloaded:
Android Stuido -> File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK, then copy-and-pasted the Android SDK Location path to Visual Studio. Find it like this in Android Studio:
I'm on a very small 128 gig SSD and need to install various android SDKs to my hard drive on this machine (d:), I'm wondering if there is a way to actually change where the Android SDK manager installs packages, and I'm also wondering if I did happen to change the install directory, what would I need to move around to ensure nothing breaks with Xamarin? Like for example would I have to move my previously installed Android SDKs?
The Android SDK Manager install packages to where the android-sdk folder is located. You can find out where your Android SDK is located by different means, including:
From the Android SDK Manager
Open Tools -> Android -> Android SDK Manager
The path will be displayed at the top of the view in the SDK Path
From Visual Studio
Navigate to Tools -> Options -> Xamarin -> Android Settings
The path is displayed at the Android SDK Location entry
From Xamarin Studio
Navigate to Tools -> Options -> Projects -> SDK Locations -> Android
The path is displayed at the Android SDK entry
As for instance, if you were to install a new SDK (say 24), that would be copied to .../android-sdk/platforms/android-24/.
What you could do is to simply move the android-sdk to any other folder of your liking. I have done this myself due to an issue with MultiDexing, where I moved the SDK to C:/android-sdk/. Just remember to update the path as described in the list above.
Here's what I did
download android studio (android-studio-ide-135.1538390-windows.zip)
unzip it and move the android-studio folder to directory "c:\users\andy"
start up "studio.exe" in the bin directory
select Configure -> Project Defaults -> Project Structure
what should I put in the Android SDK location field? Whatever directories I put in, it keeps saying invalid sdk path
Thanks,
Java JDK: 1.6 update 45
OS: Windows 7
For Android Studio 0.8.14 (the now-current download), in addition to downloading Android Studio, you also need to separately download the Android SDK, then tell Android Studio where you set up your Android SDK.
I have downloaded the android sdk tools now according to this page I should update it so I go to it's directory and type:
./android
when sdk manager opens I can see that sdk tools is installed but there isn't anything else to do. But since Qt doesn't recognize sdk so I assume I have not completely installed it yet. Is there anything else I should do to complete the installation?
Edit:
I tried somthing else. I downloaded ADT bundle. in that folder there is a sdk folder I used that folder and it worked with qt. But in that directory there are some folders that in my original sdk didn't exist:
extras
platform-tools
system-images
I suggest you to go with ADT Bundle for Linux, you can get it from following link
Android ADT for Linux
Extract the downloaded package.
Download OpenJDK for Linux and install
Update QT if necessary
Add your location of SDK to QT
Now you might be able to run Eclipse from your ADT location
ADT bundle contains
Eclipse + ADT plugin - A Customized eclipse with location of Android SDK is presetted
Android SDK Tools - Inside tools folder, contains android SDK services like Emulator, Hierarchy viewer, SQLite etc
Android Platform-tools - Contains the Compiler runtime, ADB etc
The latest Android platform - Contains each and every android versions you have downloaded with platform specific samples and themes for emulator
The latest Android system image for the emulator - Contains a system image for each of the emulator for the platforms you downloaded
Download Android SDK for Linux from Here
Extract the folder.
Now navigate to eclipse folder and run eclipse from there. android sdk is already integrated in this eclipse package and you will also get the latest SDK with this package.
UPDATE: Directory path for QT
Android SDK Location: /home/vipul/dev/android-sdk-linux
Android SDK Location: /home/vipul/dev/android-ndk-r8e
JDK Location: /usr/lib/jvm/java-6-openjdk-i386
Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later.
The machine I'm using I've not had Eclipse on before, but had to because of the SDK Issue,
I've installed
SDK 64bit here:
C:\Program Files\Java\jdk1.7.0_21
SDK 32bit here:
C:\Program Files (x86)\Java\jdk1.7.0_21
Android-Studio is install here:
C:\Program Files (x86)\Android\android-studio
Eclipse
C:\Program Files (x86)\Android\Eclipse
Now on another part of this forum a nice post said to change the settings in Configure -> Project Defaults -> Project Structures, but I'm not to sure what to change. I did go into project in (project settings), the list in there is:
None
1.7 (java version 1.7.0_21)
Android SDK (java version 1.7.0_21)
I selected Android SDK (java version 1.7.0_21). Then there are the NEW and Edit buttons. But when I try to give it a path C:\Program Files\Java\jdk1.7.0_21 etc it says it's incompatible.
My environment variables are:
ANDROID_HOME = C:\Program Files (x86)\Java\jdk1.7.0_21
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_21
Does anybody know how to fix this???
Also make sure that inside Configure > Projects Defaults > Projects Structure > Click on the "Android SDK" section at the bottom left panel and insert the path of your Android SDK like this: /Applications/Android Studio.app/sdk (Use the browser to point to the sdk folder).
Android SDK is different from Android API level.
I had this issue when i tried to migrate from Eclipse to Android Studio IDE.
The problem is the version of Android SDK Tools as the error message supposes.
Presuming you have installed Android SDK from Eclipse before:
1. Open Eclipse
2. Go to Help->Check For Updates and update to latest version (just to be sure)
3. Go to Window->Android SDK Manager
4. on the SDK Manager make sure you have selected Tools.Android SDK Tools,Platform-tools and SDK Build-tools![first 3 on the picture][1]
5. Press 'Install packages'
6. Restart Eclipse and Package Manager
7. Repeat steps 4, 5 and 6 until there is nothing left to update.
8. Close Eclipse, start Android Studio and try to 'create new project' again. This time it should work!
If you are able to start Android Studio, you can open SDK Manager from there (in the toolbox by defaut), and go on from p.4
if using Eclipse also be sure to have set the SDK path the same as in Eclipse
Android Studio - configure - Project Defaults - Project structure - Press plus- Android SDK - put path to the same sdk that you use in eclipse (run SDK and in top panel you can see this path) from here
In your eclipse
Go to Help → Install New Software.
On Work with: type https://dl-ssl.google.com/android/eclipse/ and press ENTER.
Wait for Eclipse to fetch the repository. An item named Developer tools will appear in the list.
Mark it for install, press Next and follow the steps to install the ADT tools.
When finished, it will ask to restart Eclipse. Make sure you do this.
When Eclipse restarts, all your Android SDK packages should show up again.