Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Error while Migrating to AndroidX

I am trying to migrate my project to androidX by using the option in menu. All support nuget packages are removed and andoridX packages are installed. When i try to build the project it throws an error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(5,5): Error XA2002: Can not resolve reference: Xamarin.Android.Support.Core.UI, referenced by CollectionView.Droid. Please add a NuGet package or assembly reference for Xamarin.Android.Support.Core.UI, or remove the reference to CollectionView.Droid. (XA2002)
i tried adding support packages again but I started getting another type of error.
Error AMM0000: is also present at AndroidManifest.xml:13:9-41 value=(@string/app_name).

How to resolve this one? TIA. @JohnMiller @Exoskeletor @tualatin @JohnHardman @JonDouglas @JamesMontemagno

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Please close your VS, open your project folder, delete the bin and obj folders, then re-build your project, if this issue is disappear.

    Could you attach a Diagnostic build output after rebuilding your project?

    You can change the build output verbosity from Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity, and then copy the content of the Build output pane.

  • SurbhiAroraaSurbhiAroraa Member ✭✭✭

    @LeonLu I got this error resolved by downgrading the Xamarin.Forms Version to 4.6 from 4.8 and local build is succsessful in debug and release mode both, Now i am trying to run the same build on azure for aab package format and followed steps mentioned in by @JamesMontemagno https://devblogs.microsoft.com/xamarin/android-app-bundles-azure-devops/#azure-devops
    Build is failing with error MSBUILD : error MSB1001: Unknown switch.
    Switch: -restore -t:SignAndroidPackage -p:AndroidPackageFormat=aab -p:AndroidKeyStore=True -p:AndroidSigningKeyStore=/Users/runner/work/_temp/Keystorefile.keystore -p:AndroidSigningStorePass=password -p:AndroidSigningKeyAlias=keyalias -p:AndroidSigningKeyPass=password
    How to resolve this. TIA
    @JonDouglas @JohnMiller

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    edited September 21

    Please share how you configured your Xamarin.Android build task? Please try to use the Browse Project extension option of the three dots on the right of the Project option to select the project you need to build:

  • SurbhiAroraaSurbhiAroraa Member ✭✭✭

    @LeonLu I have selected the project your way only. Here is Xamarin.Android build task



  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Please try to remove the double quotes in addational arguments of MSBuild Options:

Sign In or Register to comment.