locked
Upgrade project from Android 9 to Android 10 RRS feed

  • Question

  • User380691 posted

    Hi,

    I'm trying to upgrade my project from Android 9 to Android 10 in Visual Studio 2019. But when I'm trying to rebuild the solution, I get this error message:

    Could not find 31 Android X assemblies, make sure to install the following NuGet packages: - Xamarin.AndroidX.Lifecycle.LiveData - Xamarin.Google.Android.Material - Xamarin.AndroidX.Legacy.Support.V4 - Xamarin.AndroidX.MediaRouter - Xamarin.AndroidX.Palette

    So starting with installing Xamarin.AndroidX.Lifecycle.LiveData through NuGet

    But than I get the error: Package Xamarin.AndroidX.Lifecycle.LiveData 2.3.0.1 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Xamarin.AndroidX.Lifecycle.LiveData 2.3.0.1 supports: monoandroid90 (MonoAndroid,Version=v9.0)

    So I'm puzzeled, when I upgrade to Android 10 I get the error message to install packages which seem to be only for Android 9? As a starter I surely must be making a mistake. Can anyone point me in the right direction to get this upgrade done?

    Sunday, February 28, 2021 10:33 AM

Answers

  • User371688 posted

    You can try to migrate your app to AndroidX.

    You can enable the AndroidX Migrator via Tools > Options > Xamarin > Android Settings inside Visual Studio 2019 (you can skip this step on Visual Studio for Mac).

    Right-click your project and Migrate to AndroidX.

    For more details, you can check document: AndroidX with Xamarin.


    Xamarin forums are migrating to a new home on Microsoft Q&A! We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A! For more information, please refer to this sticky post.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, March 1, 2021 2:03 AM

All replies

  • User392037 posted

    Hi @cDGoITConsultancy please make sure to migrate your project to androidX and keep you android sdks up to date as you can see I'm using here android 11 with listed libraries you mentioned

    Monday, March 1, 2021 1:14 AM
  • User371688 posted

    You can try to migrate your app to AndroidX.

    You can enable the AndroidX Migrator via Tools > Options > Xamarin > Android Settings inside Visual Studio 2019 (you can skip this step on Visual Studio for Mac).

    Right-click your project and Migrate to AndroidX.

    For more details, you can check document: AndroidX with Xamarin.


    Xamarin forums are migrating to a new home on Microsoft Q&A! We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A! For more information, please refer to this sticky post.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, March 1, 2021 2:03 AM
  • User380691 posted

    @taregelzoubi You're video was very helpfull to check if everything else was done. @jezh your instruction was the actual step I needed to take

    Monday, March 1, 2021 7:58 AM
  • User394824 posted

    You should only install it in your Android project

    Thursday, April 8, 2021 12:31 PM