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.
Related
Using Visual Studio 2017 and Xamarin, I installed the Xamarin Android SDK Manager to replace the default Android SDK Manager, which is now deprecated.
Then I updated JDK to the current x64 version and, using the Xamarin SDK Manager, I installed the most recent version of Android NDK.
I now want to update the locations of these SDK's in the Xamarin Android SDK Manager, Locations tab like so:
Yet, every time I restart the tool, the locations are reset. It also keeps telling me there's 2 components to install, yet when I do, it doesn't complain about any failure.
I have tried running as Admin and cannot seem to figure out what is wrong. Log files seem to be non existent. Is there anyone who has the same problem and found a solution?
This was a bug and has been fixed in 0.1.76.
See https://bugzilla.xamarin.com/show_bug.cgi?id=58319 for details.
Download the newest version here: https://marketplace.visualstudio.com/items?itemName=Xamarin.XamarinAndroidSDKManager
I'm getting Android Build Failures and would like to locate adb to do some queries like adb devices but where is adb installed? I've already installed the Android SDK for Unity.
From #Programmer's answer, this line is no longer true:
You are responsible for downloading, installing and setting up Android SDK and then manually setting the paths in Unity.
Unity now allows and encourages you to install the Android SDK via their Unity Hub:
Use the Unity Hub to install Android Build Support and the required Android SDK & NDK tools:
From the same page, I found adb.exe is located at: /c/Program Files/Unity/Hub/Editor/2019.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb.exe
Updated answer for 2022:
C:\Program Files\Unity Editors\YOURVERSION\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools
For OSX users:
/Applications/Unity/Hub/Editor/2022.1.0b16/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb
Where is adb installed when it comes with unity?
adb is never installed when you install Unity. You are responsible for downloading, installing and setting up Android SDK and then manually setting the paths in Unity.
You download Android SDK, then JDK and setup the paths in Unity.
That's it. If you want to build for Android with IL2CPP then you must also download the Android NDK and also set the link up in the Editor.
See this post if you have problems setting it up.
If you want to see the SDK path go here:
EDIT:
Go to Edit ---> Preferences --->External Tools then scroll down to SDK under Android, you will see the SDK path there.
Once you find the SDK path, "adb.exe" will be located at <SDK_PATH>/platform-tools.
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.
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
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\