Xamarin Android SDK Manager doesn't save locations - xamarin

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

Related

Android SDK location in OSX - Has it been actually installed by Unity Hub?

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.

Xamarin - How to update Mono.Android version to resolve dependencies?

I'm trying to install a nuget package (Xamarin.Firebase.Firestore) which requires a newer version of Xamarin.GooglePlayServices.Basement (60.1142.0, I have 42.1021.1), which in turn requires me to update the xamarin.android.support packages. When I try to update those, I get this error
"Package Xamarin.Android.Support.Design 27.0.2 is not compatible with monoandroid80 (MonoAndroid,Version=v8.0). Package Xamarin.Android.Support.Design 27.0.2 supports: monoandroid81 (MonoAndroid,Version=v8.1)"
I've tried changing my target android version to 8.1, I've also updated my SDK as well as the build tools. I'm running Visual Studio 15.6.1. As a last ditch effort, I tried deleting the Mono.Android V8.0 reference and then adding a new reference to V8.1, but whenever I do so, Visual studio just ends up adding the reference with the path pointing to V8.0, even though the reference I added was clearly pointing to V8.1.
Anyone has a clue how to resolve this issue?
tried changing my target android version to 8.1
You need to change the Target Framework that is used to compile your android application, not the Target Android version (but assumably you would set these two to the same, read the Understanding Android API Levels link below.
Visual Studio for Windows:
Visual Studio for Mac:
Target Framework – Specifies which framework to use in building your application. This API level is used at compile time by Xamarin.Android.
Minimum Android Version – Specifies the oldest Android version that you want your app to support. This API level is used at run time by Android.
Target Android Version – Specifies the version of Android that your app is intended to run on. This API level is used at run time by Android.
Understanding Android API Levels
Manifest Entries:
Visual Studio for Windows:
Visual Studio for Mac:

Appcelerator | 'Android Distribution' Android SDK version 4.1.2 not found

I have pulled an Appcelerator project from our developer group and unable to publish or run the project on a local Android device.
When trying to publish the below error screen immediately pops up.
Android SDK version 4.1.2 not found.
I have checked both in the Appcelerator platform settings and Android Studio config and have the SDK installed.The install SDK screen in Appcelerator Tried uninstalling/reinstalling Appcli and the SDK to no avail.
After a few days of searching all the appecelerator files in my project. I finally found the fix for my problem (for anyone googling this).
There's a hidden file in the root of the Appcli project called .settings
Inside of settings there's a package called com.appcelerator.titanium.android.core.prefs
There is an android/sdk_version=4.1.2 that was causing all my issues. Hope that helps someone.
Most likely, your issue seems to be with unsupported Android SDK version as per Ti SDK you are using.
So before doing anything, try to grab what this page says to know all about software compatibilities: Titanium Comptability Matrix
It says that minimum Android version as of latest Ti SDK 6.x.x is API 16.
Now, follow these steps carefully to get a fresh start on your system.
First of all, download Android latest SDK from here: Android SDK
Unzip it & put it in at some simple path like in /Users/username/android-sdk
Download Appcelerator Studio (AS) & install it. It will download all pre-requisites like Java, Python
Open Appcelerator Studio & go to Preferences->Studio->Platforms->Android. Select the path of android sdk you unzipped in step 2.
After all these steps, you can open Android SDK Manager (see screenshot where it is) & install necessary SDK, Tools, etc.
Note: I do not suggest to download SDKs via AS as I have faced path issues in beginning.
Even if these steps do not help you, then provide us the log output after running this command on terminal: appc info
If terminal says this command is not found, then you need to go through the AS installation properly.
I had the same issue. Simply deleting all " Android Play Store Distribution" configurations solved my problem.

Android Studio for Project Tango

I have downloaded latest Android Studio 2.2.3 and I want to start with C examples for project Tango phone (Lenovo Phab 2 Pro) using C API. The phone itself says it's run Android 6.0.1, kernel 3.10.84 on device.
Google developer documentation for Tango Project suggest to install Android Studio with Android SDK 24.4.1, Platform tools 23.1 and NDK 11.0.0.
By installing latest Android Studio there is no offering to install those versions of tools. Is it possible to use whatever SDK for development (latest)?
Where do I find aforementioned versions?
What Android SDK & NDK version is required for phone which run Android 6.0.1?
I started using the Dev Kit which runs Android 4.4 KitKat and I just recently got the Phab 2 Pro this week and I didn't need to make any updates to my Android Studio SDK manager.
Since I am working only with the Tango and not with the underlying Android features, I have found no need to require 6.0 for I am not using any of the extra features.
Also go here and clone the repo and run the hello-world and see if you can get it to work on your phone, if so you are good to go!
the SDK Manager which is part of Android Studio offers you choices on levels of android builds like 4.4.2/5.1/6.0/6.1, etc. Platform tools package is a module within the SDK Manager which also has levels which are based on the android build. The NDK is a completely different package and depending on what you want to accomplish you might be able to not worry about it to start of with. install Android Studio and then setup the SDK Manager to cover what devices you want to build for. get the latest Platform tools package setup and you will be ready to code. once you start setting up your environment things will fall in place. for the most part the installer does the work. pay attention to the things needed prior to installing Android Studio. i think you need to install a jdk and set paths and variables.

Android SDK could not be found - Android SDK Location is correct

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.

Resources