I had created a new Xamarin Forms project (Sept 2017), but when got around to running / building the droid platform I am getting this build error -
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error: java.lang.IllegalArgumentException: already added : Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat; (XYZ.Droid)
In packages, update the Xamarin.Android.Support packages to the latest version.
Related
I'm attempting to upgrade the Realm database version I'm using in my Xamarin Forms project, from v5 up to the latest v10.
The original Realm database has been working fine for years, however when I try to use Realm v10 I can build the Android project successfully, but when I attempt to build the iOS project I get the error:
"No matching framework found inside 'C:\Users\MyName.nuget\packages\realm\10.11.1\build..\native\ios\universal\realm-wrappers.xcframework'"
...and I'm at a loss. A Google search is very scant on the subject, so I don't have any direction to get this build working.
I'm using Windows 10, Visual Studio 2022, linked to a macOS Monterey build server with Xcode 13.3.1
EDIT: As advised, I have opened an issue on GitHub for this:
https://github.com/realm/realm-dotnet/issues/2914
I have Xamarin Android Project with Target Framework v9.
Recently, I updated my Xamarin Forms to latest version. Then, I am getting below error.
I understand from the error message that I need to update 'Target Framework' from Android 9 to Android 10. I did it.
From that moment, whenever I build my android project in 'Release' mode, I get below error. Building project in 'Debug' mode is fine.
May you please help? I need to submit an update to my Android App. :-(
From the comment of "Lucas Zhang - MSFT":
Please enable the
Use incremental Android packaging system (Aapt2)
which is available under Project Properties. It will resolve the error you posted.
I am trying to use Microsoft.AppCenter nuget to a Xamarin app. Xamarin.Android is building fine. But I am getting an error while trying to build the Xamarin.iOS app.
MTOUCH: Error MT5210: Native linking failed, undefined symbol: _kMSLongTypedPropertyType. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
I have tried the solution mentioned in the below link
https://learn.microsoft.com/en-us/xamarin/ios/troubleshooting/mtouch-errors#MT5210
But I am still getting the error while I am trying to build Xamarin.iOS app. I am using the below configurations:
Visual Studio Community 2019 for Mac
Version 8.4.4 (build 91)
Xamarin.iOS
Version: 13.10.0.17 (Visual Studio Community)
The issue got fixed after installing Microsoft.AppCenter.Analytics and Microsoft.AppCenter.Crashes. As #Junior Jiang - MSFT mentioned, if code uses microsoft app center to get the analytics and crashes, we need to install these two nugets along with Microsoft.AppCenter. Thanks.
I have an intruder problem. I have created a xamarin form solution with monoandroid 8.1 and .net standard 2.0 and everything was going fine, but once I added UI test project and add android project as reference I saw 4 errors and when I built it build was successful but the error was still visible.
When I build it in app center it fails and shows me these 4 errors:
errors list
Log from app center
2018-06-11T10:26:21.6746020Z NU1201: Project UserLogin.Android is not
compatible with net471 (.NETFramework,Version=v4.7.1). Project
UserLogin.Android supports: monoandroid81 (MonoAndroid,Version=v8.1)
I solved this problem after update visual studio to latest version
I added Xamarin Forms Labs 1.2.O from NuGet to the iOS project. The same project also references Xamarin Forms dll, v1.3.0.6292.
After adding the Xamarin labs reference and updating AppDelegate to inherit from XFormsApplicationDelegate, I keep getting this compile time error:
MTOUCHTASK: error MT2002: Failed to resolve assembly: 'Xamarin.Forms.Platform.iOS, Version=1.2.3.0 ...
How do I resolve this issue?
When using Xamarin.Forms 1.3 you needed to update to the latest pre-release of Xamarin.Labs which is Xamarin.Forms.Labs 1.2.1-pre2.
Try updating to that to see if it works.