Unity cannot find Android SDK on Windows - android

I installed Android Studio (3.6.2) along with Android SDK, but when I choose its folder in Unity (Edit -> Preferences -> External Tools), it says "Unable to detect SDK in the selected directory." What do I have to do to make it work? I use Unity 2018.4 (LTS) on Windows 10.

Unity seems to have trouble with folder structure of SDK installed with Android Studio. It seems it expects command line tools to contain folder called tools, but Android Studio stores those in cmdline-tools\latest. Assuming the SDK is installed in C:\Users\{username}\AppData\Local\Android\Sdk you have to do the following:
Copy folder C:\Users\{username}\AppData\Local\Android\Sdk\cmdline-tools\latest to C:\Users\{username}\AppData\Local\Android\Sdk\
Rename latest to tools
In the end you should have a folder called C:\Users\{username}\AppData\Local\Android\Sdk\tools present. It should contain bin and lib folders. When you choose Sdk folder in Unity, it processes it and you should be able to build Android apk.
I have no idea if this is the right approach, but we were able to make Android builds work on Windows following these steps.

Related

How can I install the SDK tools offline after just installing Android Studio?

I just downloaded Android Studio and after installing it asked to download the SDK tools. I downloaded all the zip files which were required to be installed(not from SDK manager). But now I want to know that how to install all these packages?(https://i.stack.imgur.com/mXail.png)
This is how the SDK folder look like after I extracted the initial basic packages. And I have installed Android Studio and after that just extracted these packages in the SDK folder and I didn't extracted anything. When I try to make a new project it shows add on list. So tell me what should I do?
you must configure SDK correct path in your android studio setting... provide correct path

Android Studio is unable to find Android SDK

I have downloaded the latest version of Android 3.0.1.0 along with the command line sdk tools. I unzipped both the files and tried to install Android Studion but it doesn't find SDK. After searching online I put unzipped SDK folder into the following directory C:\Users\User-Name\AppData\Local\Android\Sdk, but it still doesn't find it.I have also heard that Android Studio contains SDk tools but still it is showing no SDK tools.Please help me.I am using windows 7 32-bit OS.
In Android Studio go to:
File → Settings → Appearance & Behaviour → System Settings → Android SDK
and set the location of your SDK
I had the same problem. The real problem was diacritics in my user home folder in windows! (C:\Users\Rodiče).
So I renamed it (here are the steps:
https://superuser.com/questions/890812/how-to-rename-the-user-folder-in-windows-10)
and then make symlink (for possible applications which uses the old path):
mklink /J "c:\Users\Rodice\" "c:\Users\Rodiče\"

Where is android SDK location?

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.

Android SDK installation (adt-bundle-windows-x86_64-20131030)

I have Win7-64 laptop, installed JDK, Eclise is working. I am failing to install the Android SDK. I downloaded 'adt-bundle-windows-x86_64-20131030' from developer.android. When I used SDK Manager, i could select required installation components and it shows as complete. However, I dont see anything in the 'All Programs'. I also dont see any plugin (that I was supposed to see) in the Eclipse as well. So I gather I am missing some step. Can anyone help. Pl see![][1]
Your downloaded sdk files may not shown in All Programs as they are not executable nor meaningless to be clickable.
Sometimes many folks got a problem to point out exact SDK path, so more than one SDK binaries are downloaded. I think your eclipse cannot find sdk path properly.
To find out where the SDK path is, it displays in SDK Manager.
Then, you can set the path in Eclipse Eclipse->Window->Preferences-> select Android from left hand menu. Check SDK Location has same path; see screenshot.
FYI, as downloaded files are just a bunch of binaries used only for Android development, you can copy the whole android-sdk folder to other place.
I personally recommend to change the directory to C:\Android or C:\User\<me>\Documents\Android-sdk as default directory is in C:\Users\<me>\AppData\Local hidden folder.
The ADT bundle includes an Eclipse executable fully configured with the Android SDK tools. It does not add a plugin to an existing Eclipse install. To launch ADT/Eclipse goto . Search for eclipse.exe within that directory. This is the executable you need to launch.
On my Mac, the Eclipse executable is in /Applications/adt-bundle-mac-x86_64/eclipse/Eclipse.app/Contents/MacOS/eclipse. Just a guess, but on Windows, the path will probably look something like adt-bundle-windows-x86/eclipse/Eclipse.app/Contents/windows/eclipse.exe
I would personally suggest to use Android Studio 2.1 for easy install of plugins as whenever there is an update to any platform tools or build tools they are readily available and the dependency injection is far better with the build tools such as Gradle which are bundled with the Android Studio .
Android Studio
Android adt is plugin to use Android SDK in Eclipse IDE. You have SDK you have Eclipse now you need to install adt plugin in eclipse to use your SDK.
You can refer Android developers for plugin installation
https://stuff.mit.edu/afs/sipb/project/android/docs/sdk/installing/installing-adt.html#Download
For "I dont see anything in the 'All Programs' I also dont see any plugin" part you will not see any extra program installed in your system as adt is extension of eclipse. When you will have adt in place you should be able to see Android option in eclipse preferences. You should also be see Android APplication option while creating new project.

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")

Categories

Resources