Designer not working for Android Xamarin app - xamarin

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\

Related

Visual Studio Mac can't find Xamarin.Android

I have a problem in my visual studio for mac, that prevents me from building android apps.
As you can see in the screenshots I can't even select an android SDK.
And my project tells me that Xamarin.Android is not installed.
I already tried reinstalling VisualStudio and Xamarin.Android but didn't helped.
Does anyone knows whether there is a cache or config file or something else that is maybe wrong and not correctly updated?
Launch Visual Studio for Mac and open the Extension Manager (App Menu / Extensions) and make sure that the Android extensions/addins are enabled:
If they are, check the IDE logs for errors related those extensions:
Help / Open Log Directory
AndroidTools.XXXXXXXX.log
and
Ide.XXXXXXXX.log

Unable to see list of emulator devices for Xamarin Android in VS 2015

I am using VS 2015 enterprise update 3. After fresh installation, I created a new project--> cross platform tools--> Blank Xaml App(Xamarin.Forms Portable). then made Andriod project is default project from Solution explorer.
Tried select a device but none is available, altough when i open SDK Manager i can see 3 devices.
Andriod error
List of devices
Did you setup your android project as your startup project?
Werid because in your screenshot it shows your portable project as your startup project. This is how it looks like when i debug my android project.

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.

Xamarin Installer doesn't recognize installed Android SDK on my Mac

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

Couldn't Start UWP project in Xamrin Forms

I am starting my first Xamarin Forms application using Visual Studio 2015. The default template provided 6 Project. (Android,iOS,PCL,UWP,8.1,windows phone).
All the projects works correctly including the Android,8.1,Windows Phone Emulator.
But when i try to deploy the UWP project , breaks (Exception) at the first statement where it calls the MainPage inside PCL. This happens in both Local Machine and Emulator. (debug Mode , All CPU).
I have already updated xamarin forms to the latest stable release, updated Visual Studio but i am not able to resolve the issue.
Exception:
An exception of type 'System.TypeLoadException' occurred in
Xamarin.Forms.Platform.UAP.dll but was not handled in user code
Additional information: Could not find Windows Runtime type
'Windows.UI.ViewManagement.StatusBar'.
Please Help
The Windows.UI.ViewManagement.StatusBar is a type that is only available in the Windows Mobile Extension SDK and you have to reference this SDK for it to be available.
Right-click your UWP project in the Solution Explorer, select Add -> Reference, then under Universal Windows select Extensions and find Windows Mobile Extensions for the UWP. Check the one that matches the targeted Windows 10 build version of your app.
You also need to use the IsTypePresent API, which will check at runtime if the type is available on the current device. This is important, because StatusBar does not exist on any other version of Windows 10 than on Mobile:
if(ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar") )
{
//your code
}
Look like issue in xamarin UWP concept , are you updated Xamain.Forms ?
Goto Tools-> NuGet Package manager -> Manage Package for Solution -> Microsoft.NETCore.Universal Windows Platform -> update latest version.
after updated all , still same problem please check here some around
https://forums.xamarin.com/discussion/64731/how-to-solve-unknown-type-in-uwp-app-windows-ui-viewmanagement-statusbar
If none of this work try updating your windows SDK to the latest version. It worked for me. I also added the reference to Windows Mobile Extensions for the UWP.
EDIT:
I also have experimented that sometimes when you update visual studio it fails again. I had to manually change de SDK version in my UWP project, going to Properties > Application > Target Version > Select latest version

Resources