Xamarin Forms Android Compile Error - xamarin.forms

I'm trying to update my Xamarin Forms app to the latest Xamarin Forms and target the Android version against 7.1. After updating the build and target framework to 7.1 I'm getting the following compile time error:
/Users/austingrigg/Projects/ArtCloud/Droid/ERROR: Error APT0000: In AppBarLayout, unable to find attribute android:keyboardNavigationCluster (APT0000) (ArtCloud.Droid)
I'm using Visual Studio for Mac (7.3), Xamarin Forms 2.5.0.121934, and Xamarin Support Libraries 25.4.0.2

Make sure ALL of your Nugets are the same version. Open up your packages.xml and double check, then do a full clean/rebuild and try to delete your bin/obj folders.

Related

Error com.opennetcf.extensions.pcl is not compatible with netstandard1.5

I'm trying to understand the root of this error:
Package com.opennetcf.extensions.pcl is not compatible with netstandard1.5
I get it when I try to update xamarin essentials from nuget in my xamarin forms project. If I don't update that package, the project works fine. This is what I don't understand. If the PCL is not compatilble with .net standard 1.5, why does the project currently work when I'm using both. Why do I only see this error when I try to update xamarin essentials?
I've been reading a lot of articles on PCL support but I'm not sure what I need to do in this case. My main concern is updating xamarin essentials.
Any thoughts?

How to fix Xamarin Forms pipeline Target Framework error

Locally, I can build and run my Xamarin Forms application with no issues. In my Azure build pipelines I have my master branch failing because of my target framework version. It says it is 9.0 when it should be at least 10.0.
In my Android project file I have the framework version set to 10.0. I have made sure it is also v10 in the properties tab for the project. Yet I still get the below error.
##[error]C:\Users\VssAdministrator\.nuget\packages\xamarin.forms\5.0.0.2012\build\Xamarin.Forms.targets(188,5): Error XF005: The $(TargetFrameworkVersion) for MyApp.Android (v9.0) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (10.0). You need to increase the $(TargetFrameworkVersion) for MyApp.Android.
Try to open your .csproj file,and manually modify its targetFrameworkVersion.
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
Verify that BOTH of the following project properties are set to 10.0:
Application / Compile using Android version (Target Framework).
Android Manifest / Target Android version.
https://learn.microsoft.com/en-us/xamarin/android/app-fundamentals/android-api-levels
If those are already both 10.0, then make sure the Azure build pipeline has up-to-date versions of Android SDKs and tools.
Another way to fix:
If you are able to create a new sample solution, and successfully build that via Azure, then start a new solution, and add all your files to it.

Xamarin.Android Build Error for Xamarin Forms 4 Solution

I am trying to compile a newly created Xamarin.Forms solution using Visual Studio Pro 2019 version 16.1.3. I use the stable Xamarin.Forms version 4.0.0.425677. The solution contains an iOS, Android and UWP project.
When I try to compile I get the following Android compilation error even without having made any code changes.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3326,2): error : A part of the path "AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.class" could not be found
The only related post I found was here which recommends to delete bin and obj folders in the Android project. This does not apply since I start with an new solution in the first place. Any ideas what the cause could be?
Well, it turns out that I only get this issue when I have the term "Xamarin" in my Android project name. This seems to confuse the Android compiler.

Xamarin Forms NU1202 & NU1608 Error

I tried installing xamarin forms in my computer today then tried to make a blank cross platform proj. after I run the proj using xamarin live I get this error:
Start Android SDK Manager
and select the latest Android 8.1 Platform SDK (API 27)
In the Android Project properties, select "Use latest Platform (Android 8.1)"
Now restore the NuGet packages and rebuild the app.

I am developing iOS and Android app with Xamarin Forms in MAC. I am installing PCL Xamarin.Mobile, but i am getting error

The error i am getting while installing PCL. Any idea about below mentioned error?
Could not install package 'xamstore-xamarin.mobile 0.7.1'. You are
trying to install this package into a project that targets
'.NETPortable,Version=v4.5,Profile=Profile259', but the package does
not contain any assembly references or content files that are
compatible with that framework. For more information, contact the
package author.
From Xamarin Developer Matt Ward on the Xamarin Forums
The NuGet package xamstore-xamarin.mobile 0.7.1 only supports MonoAndroid and MonoTouch. It contains MSBuild property files for these two frameworks. You will not be able to install it into a Portable Class Library (PCL) project since it does not have any files that target any PCL framework.
Instead you should be able to add it to a Android or iOS project.
Similarly Xamarin.Mobile from the component store supports Android and iOS projects. It has assemblies for those platforms as well as for Windows Phone 7/8 and Windows 8 (WinRT). So you would be able to add that component into an Android or iOS project but not a PCL project.

Resources