Apparently this is not a problem and someone proposed a solution that apparently works on Windows, this issue still exists on Mac.
Although the SDK installed by Android Studio on its default path (/Users/user/Library/Android) exists, Xamarin installer still wants to download a "private copy of android sdk":
Does anybody know a workaround?
I had this same issue. You can either add the path to the downloaded SDK by clicking the + button, or create folders in the default Xamarin location and then copy the sdk there.
Even though I tried this, a new Android SDK had just been released. The Xamarin installer was intent on downloading the latest version though, and I eventually ended up leaving it to complete.
I was able to change the Android SDK Location in Xamarin Studio to use what was already installed on my mac:
Xamarin Studio top right menu
Xamarin Studio Community
Preferences
SDK Locations
Android
Android SDK Location : Browse and choose the location of your android install; it's usually at the following location on a mac -> user/Library/Android/sdk
Related
We are using Unity 2018.3.8f1.
We have added Android Build Support from Unity Hub - Add Component:
But if we go to Unity Preferences - External Tools, the Android SDK location is empty:
I have not been able to find the location of the Android SDK folder anywhere. I'm wondering if the component installed by Unity Hub is something different to Android SDK. Maybe it must be installed separately from: https://developer.android.com/studio?pkg=tools#downloads?
UPDATE
So far I have installed "Command line tools only" from the previous link. Then, I have installed OpenSDK (Vistual Studio did it for me: it asked me to update and install it as one of the things to update).
But when I opened tools/bin/sdkmanager, it said "Java is not installed". So I also installed Oracle Java SDK. Unfortunately tools/bin/sdkmanager returned errors after it. I applied a few workarounds I found by googling the errors. Still not luck.
So I have moved to the easy way: installing the full version of Android Studio. If we choose custom, we'll see that Android SDK Platform is going to be installed:
So it is working, but I still have not idea of how many things I have duplicated on my system wasting space. I have:
The Android component installed from Unity Hub
Android Studio installed, which comes with the emulator and the IDE (I don't need them)
OpenSDK (installed by Visual Studio)
An embedded version of Java in Unity
Oracle Java
Are they all actually needed? I don't think so!
It seems the only thing you are wondering is if the component installed by Unity hub is something different to Android SDK... the short answer is yes. You have to download it on the Android Developer SDK website you linked in the question. You only need the SDK under "Command line tools only" at the bottom of the page. If you do this you also need to download the jdk separatly here.
After reinstalling Windows/Visual Studio 2015/Xamarin I can no longer compile Android projects as Xamarin cannot locate the Android SDK.
I installed the Android SDK via the Xamarin installer to the default path (AppData) and as you can see from the screenshot the path is configured correctly.
When I run a build I get the following error as the Android SDK path Xamarin is searching for is in Program Files (x86) despite the Android SDK location setting pointing to AppData.
No Android platform found. Please click here to open the SDK Manager and install an Android SDK Platform.
How can I configure Xamarin to use the Android SDK in AppData?
Additional info:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\Path is also pointing to AppData
I dont think its relevant but I used the Windows 10 reset & keep files feature to reinstall, perhaps it left some residual configuration that is conflicting with the new installation...
Confirm you have correct android api level installed. In your case android API level 25. Copy your exact android-sdk path from Xamarin settings into explorer address. and then navigate into the platforms subfolder from there to ensure it is installed in that exact location e.g. android-sdk\platforms\android-25? I know there is a program files x86 error but please check android-25 folder is in your specified sdk path.
Try run xdecleanup.exe in C:\Program Files (x86)\Microsoft XDE
(I know you have tried this but for answer robustness sake) Ensure HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tool points to the correct sdk location
restart your pc and try a clean rebuild
You should point your environment variable to the location of sdk in AppData->Local->Android->android-sdk,
and update all your android sdk tools and android sdk platform tools in sdk manager.
I've installed Xamarin and tried in Visual Studio to start with a small app and test the web view with this. So for this, I've installed the JDK, the Android SDK and Android NDK on my computer. I'm working throught a tutorial for a web view and I have the problem, when I run the Main.axml, it shows me the error, that my Android SDK could not be found (look at the first attachement). When I check my location paths for the JDK, SDK and NDK, it shows me the correct path and a green tick, so the path and files are correct (look at the second attachement). But my app don't recognize it. What's the problem here? I found some threads on stackoverflow for the same problem, but nothing helped me.
1. Attachement
2. Attachement
OS: Windows 8.1
IDE: MS Visual Studio 14.0.23
Xamarin: 4.2.0
EDIT:
I also tried to open my Android SDK Manager, but this one is disabled in my visual studio. I've installed Xamarin, so it should work:
Any ideas? Thanks.
I tried so many things and finally I have the solution for my problem:
Possible reason for the problem: I just installed the Xamarin, which installes also the JDK, Android SKD and Android NDK in it's wizzard, so I thought this should be the correct versions. After installing Xamarin, I opened my Visual Studio and checked the paths (Tool - Options - Xamarin - Android seetings) for my JDK, SDK and NDK. The paths show on the versions, which were installed by Xamarin. My Android SDK Manager was disabled.
Solution: Then I uninstall everything - the JDK, SDK and NDK and also the whole Xamarin and my old Android Studio. After that, I decided to install the newest JDK from the Java website, the newes Android SDK/NDK from the Android Studio website and a plane xamarin without the sdk/jdk installation. So I could be sure, that I have the correct versions. After the installation, I again opened Visual Studio - Tool - Options - Android seetings and set the paths to the new versions. Than I checked my Android SDK Manager and it was finally enabled and so I installed also the newest Android SDK Tools. After that I cleaned and builded my solution, start it and my android emulator opens my webview page. So I think, the best way is to install the required programms from their website and not automaticlly with xamarin. Now it works. Cheers.
Can Xamarin point to a different location for Android SDK and the NDK than its normal directory in <username>/Library/Developer/Xamarin/ where Xamarin installer has put them in, is there anything special to those locations for Xamarin, or the dir Android Studio Setup Wizard uses ok? For example to the /usr/local/opt/android-sdk where homebrew installs it.
The reason I want to be able to do this is to save disk space since I want to use another tool/ide, Deco for React Native development, as well as Xamarin that asks for Android SDK. Android SDK and Android NDK is more than 10GBs. Also this would keep me download and update time.
Is there anything specific for Xamarin with those directories it puts Android SDK and NDK in? If not, when I change those dirs from Xamarin preferences, will it take any other effort to set, configure Xamarin for that change?
Xamarin Studio / Preferences / Projects / Android
Android Studio Using the same directories:
Note: On my personal Mac, I have Android Studio pointing to where Xamarin installs the Android SDK/NDK.
Note: Xamarin does not make any changes to these directories, they are maintained by Google's installers and Xamarin content copies out of them when they to inflate a zip, etc...
You can change Xamarin to point to the SDK/NDK that Android Studio installs, your choice.
I am 100% new to Xamarin seem to have done something wrong in Visual Studio 2015. I am just trying to view my Main.axml file however the designer is giving me the following error:
A valid Android SDK could not be found. An existing SDK with platform tool and at least one platform needs to be registered with the IDE.
Do I need to do soemthing specific to fix this?
As you can see I am targeting Android 4.1 API 16.
Another weird issue is that the Android SDK Manager is disabled is this normal?
visual studio -> tools ->options:
To launch Android SDK Manager I have to launch Android studio and click on Android SDK Manager :
I had same issue with my sdk on visual studio. I could not open sdk manager from visual studio and xamarin designer could not open even though i pointed to an sdk location. however, other things worked correctly. Updating sdk from android studio and upgrading jdk to 1.8.0_102. solved my problem.
While the Xamarin is updating, that error can see.
Solved is found the tools zip file:
C:\Users\User Name\AppData\Local\Android\android-sdk\temp\tools_r25.2.4-windows (or your active last tools, doesnt matter. for ex. tools_r23.0.1)
-> Open that zip and unzip in "tools" folder.
-> Cut that folder and, paste parent folder (C:\Users\User Name\AppData\Local\Android\android-sdk)
Delete files from this path:
C:\Users\ ++ Your Windows Account Here ++ \AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache\