Forum Xamarin Xamarin.Android

APK not getting installed after upgrading to AndroidX

I have migrated existing xamarin project to AndroidX ,by choosing the option from menu (Migrate to AndroidX). After that i encountered error due to missing reference of support library. I added Xamarin.Android.Support.Core.UI , Xamarin.Android.Support.CustomTabs, Xamarin.Android.Support.v7.RecyclerView and build issues resolved. Able to run the app locally in emulator in Debug and Release Mode. But if i tries to install the apk, it doesnt get installed. @JamesMontemagno @JohnMiller @JonDouglas @jezh
TIA.

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited September 18

    But if i tries to install the apk, it doesnt get installed

    Did any error occur? Such as 'App not installed'. Try to uninstallthe previous application on the device and clear the cache, then install the apk again.

    After that i encountered error due to missing reference of support library.

    This is because after migrating to AndroidX, we need to make some manual namespace changes for scenarios. To migrate to AndroidX, try to reference the AndroidX libraries. If the application does not include any dependencies that require AndroidX namespace migration, you can use the AndroidX libraries on NuGet.
    Check the link:
    https://docs.microsoft.com/en-us/xamarin/android/platform/androidx#migration-tooling

  • JarvanJarvan Member, Xamarin Team Xamurai

    Try to set android:extractNativeLibs to true in the AndroidManifest.xml.

    android:extractNativeLibs="true"
    

    Refer to: https://stackoverflow.com/a/63684011/11083277

Sign In or Register to comment.