Support for Android API 15 in Visual Studio 2019 - xamarin

I'm trying to run an Xamarin.Android project into Visual Studio 2019. But i get the error 'Unsupported or invalid $(TargetFrameworkVersion) value of 'v4.0.3'.' Seems that the Android SDK 4.0.3 (API 15) is installed, but not available for VS2019 as a target framework.
The setup is:
Visual Studio 2019
Xamarin 16.3
Xamarin.Android SDK 10.0
Q: Is the support for the Android API 15 has been dropped for VS2019?

The support for the lower then Android API 19 version has been removed in Xamarin.Android 9.2
Removal of target framework versions below Android 4.4 (API level 19)
As cautioned by the related build warning that was added in the Xamarin.Android 9.1 release (see GitHub PR 2329), Xamarin.Android 9.2 removes support for the v2.3, v4.0.3, v4.1, v4.2, and v4.3 values of the $(TargetFrameworkVersion) MSBuild property. Projects that have one of these old target framework versions selected will now need to change it to v4.4 or higher.
#LucasZhang-MSFT pointed me into the right direction, so thank you!

Related

Unable to start XAMARIN's Android Device Manager emulator

I have created android device as indicated in the microsoft documentation, but I get the error below when I want to test the device on Android device Manager :
i have Visual Studio 2017 version 15.7.
are there any proposals at your place ??
And thank you in advance
You need to update the version of your Visual Studio 2017 to 15.8 or later.
Please check the requirements. To use the Android Device Manager, you will need the following items:
Visual Studio 2019 Community, Professional, or Enterprise.
OR Visual Studio 2017 version 15.8 or later is required. Visual
Studio Community, Professional, and Enterprise editions are
supported.
Visual Studio Tools for Xamarin version 4.9 or later.
The Android SDK must be installed (see Setting up the Android SDK for
Xamarin.Android). Be sure to install the Android SDK at its default
location if it is not already installed: C:\Program Files
(x86)\Android\android-sdk.
The following packages must be installed (via the Android SDK
Manager):
Android SDK Tools version 26.1.1 or late, Android SDK Platform-Tools 27.0.1 or later, Android SDK Build-Tools 27.0.3 or later, Android Emulator 27.2.7 or later.
For mroe details, please check the link below.
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/device-manager?tabs=windows&pivots=windows

How to Change Target API Version in Visual Studio 2017 community Xamarin

I have installed VS 2017 Community and created new project and I am getting below error during build
Error:-
project App1 cannot build using Android 6.0 (API Level 23 -
Marshmallow) because Android SDK platform for API Level 23 is not
installed. Either install it in the Android SDK Manager
(Tools->Android->Android SDK Manager...), or change your
Xamarin.Android project to target an API version that is installed
Right click on your project in the solution explorer and select Properties. In the Android Manifest tab you can choose the Target Android Version.
Cannot build using Android 6.0 (API Level 23 - Marshmallow) because Android SDK platform for API Level 23 is not installed.
It is caused when your apps are targeting API Level 23 but you don't have the SDK. (You can always change this setting on your androidmanifest.xml) or right click on your project and select options.
You have to link your Visual Studio with your Android SDK if you already installed the Android SDK.
If you haven't installed any SDK, you can click on Tools -> SDK Manager and install the Android SDK needed for your project.
NB: Don't forget, there are 3 thing you have to consider about the android SDK : Minimum Android SDK, Compile SDK, and Target Android SDK

Use Visual Studio 2017 with .Net Core SDK 2.0

Can i open a core 2.0 project in Visual Studio 2017?
I've installed the latest dotnet-core (2.0.0-preview2-005840) and created a core 2.0 console-app.
mkdir dn2cli
cd dn2cli
dotnet new console
dotnet restore
Open console.csproj in Visual Studio 2017 with "open project"
Clean and Build Solutions
i get several erros
amongs others:
Unable to resolve 'Microsoft.NETCore.App (>= 2.0.0)' for '.NETCoreApp,Version=v2.0'.
So. Is it just not supported at the moment or am i missing something?
c:\Temp>dotnet --info
.NET Command Line Tools (2.0.0-preview2-005840)
Product Information: Version: 2.0.0-preview2-005840
Commit SHA-1 hash: 8f2fcef544
Runtime Environment: OS Name: Windows OS Version: 10.0.14393
OS Platform: Windows RID: win10-x86 Base Path: C:\Program
Files (x86)\dotnet\sdk\2.0.0-preview2-005840\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview1-002061-00 Build :
2b70ec9c3b014af0c2a5f45de0e5b73a1ae51c09
Update:
There is now a VS 2017 15.3 preview that resolves this issue. Starting with VS 15.3, Visual Studio carries an MSBuild SDK resolver that determines which version of the CLI SDK a project would use (e.g. if a global.json sets the version) and uses it's MSBuild targets so new previews are picked up by VS.
Original:
You can modify your environment to get VS 2017 support for the unreleased 2.0 tooling by setting the MSBuildSdksPath as described in https://github.com/aspnet/Announcements/issues/231 so that VS picks up the build logic from the CLI.
The Visual Studio .NET Core tools were just released in March, yet the 2.0 preview you are using was released in April.
https://blogs.msdn.microsoft.com/dotnet/2017/03/07/announcing-net-core-tools-1-0/
You'll need to wait for an update to the .NET Core Tools before you can use Visual Studio with .NET Core 2.0
Visual Studio 2017 Version 15.3 Released and .NET Core 2.0 also Released with nuget v4.3 and the problem is resolved completely.
you can review all fixes Release notes
Landed on this today (April 2019) and it appears that now there is a version of .NET Core Tools SDK for VS 2017. Here's how you get to it:
1. browse to http://dot.net
2. Under .NET Core 2.2, look for "Download .NET Core SDK (Compatible with Visual Studio 2017"
3. Visual studio 2017 (I have version 15.9.11) should now list .NET Core 2.2 as a target framework

Missing Android version in Visual Studio after installing SDK

So I'm working on an Android application using Xamarin with Visual Studio Community version. The target platform is Android 7.1, however, after installing the SDK for this platform, Visual Studio does not show the option to target this version. I'm wondering if there is a step I'm missing, although the Xamarin instructions say that it should be available after installing.
If you see on this image of the project properties, I can't choose anything other than Android 6.0
Solution Properties
And I've installed the 7.1 SDK from the Android SDK Manager
Android SDK Manager
Any extra steps or work arounds that you can think of? Thanks!

Mono android not working?

I my visual studio 2010 i add mono android.And i installed android sdk and java sdk.But it always shows
'C:\Users\Dell\AppData\Local\Android\android-sdk\platforms\android-8'.
Ensure you have installed support for this Android platform version in
the Android SDK Manager. C:\Users\Dell\documents\visual studio
2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\aresgen MonoAndroidApplication1
How to slove this?
Start Android SDK Manager either from inside Visual Studio or from the location "C:\Users\Dell\AppData\Local\Android\android-sdk\tools\android.bat".
Once its done loading packages... checkmark "Android 2.2 (API8)" to install support and your error will be resolved.
Alternatively, if you are not planning to support Android 2.2 and are fine with the latest Android version, then in Visual Studio, go to Project Properties >> Application and change the API to whatever API you want.

Resources