1
votes

I checked allow unknown sources app to be installed.

java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_24 or Xamarin.Android.Platform!E/AndroidRuntime( 8048): at android.app.ActivityThread.installProvider(ActivityThread.java:5571)E/AndroidRuntime( 8048): at android.app.ActivityThread.installContentProviders(ActivityThread.java:5163)E/AndroidRuntime( 8048): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5103)E/AndroidRuntime( 8048): at android.app.ActivityThread.access$1600(ActivityThread.java:177)E/AndroidRuntime( 8048): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1510)E/AndroidRuntime( 8048): at android.os.Handler.dispatchMessage(Handler.java:102)E/AndroidRuntime( 8048): at android.os.Looper.loop(Looper.java:145)E/AndroidRuntime( 8048): at android.app.ActivityThread.main(ActivityThread.java:5951)E/AndroidRuntime( 8048): at java.lang.reflect.Method.invoke(Native Method)E/AndroidRuntime( 8048): at java.lang.reflect.Method.invoke(Method.java:372)E/AndroidRuntime( 8048): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)E/AndroidRuntime( 8048): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)E/AndroidRuntime( 8048): Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_24 or Xamarin.Android.Platform!E/AndroidRuntime( 8048): at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:38)E/AndroidRuntime( 8048): at android.app.ActivityThread.installProvider(ActivityThread.java:5568)E/AndroidRuntime( 8048): ... 11 moreE/AndroidRuntime( 8048): Caused by: android.content.pm.PackageManager$NameNotFoundException: Xamarin.Android.PlatformE/AndroidRuntime( 8048): at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:305)E/AndroidRuntime( 8048): at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:32)E/AndroidRuntime( 8048): ... 12 moreV/ApplicationPolicy( 3137): isApplicationStateBlocked userId 0 pkgname com.mycomp.test1W/ActivityManager( 3137): Force finishing activity com.mycomp.test1/md5414c3d8510d5c9d2b651f345e03d9f02.SplashScreenActivityE/android.os.Debug( 3137): ro.product_ship = true

my app installs in all my devices.. inclucidn development and non-developmetn devices

but its not installing in the my client's devices

2

2 Answers

4
votes

The application that you give didn't have mono.runtime attached as part of the app.

you were able to run the app on development machine because mono.runtime is installed in those devices.

if you go to Application Manager then you can find mono.runtime over there

just uninstall mono.runtime then restart the device then install the app and open it, it'd crash.

because both app and device doesn't have mono.runtime.

So to fix this issue, you have to uncheck Use Shared Mono Runtime so app always attaches the mono.runtime with the app package and you don't have to worry about whether the device have mono.runtime installed or not

To do this in your visual studio or xamarin studio make the following selections

Options -> General -> Android Build -> Choose Release in the configuration -> uncheck Use Shared Mono Runtime

2
votes

Unable to get provider mono.MonoRuntimeProvider

Unable to find application Mono.Android.Platform.ApiLevel_24

You are distributing an APK that does not contain the Mono runtime.

Typically debug builds are assigned to use the "Shared Mono Runtime" as the Visual Studio IDE installs the runtime separately when you are debugging, one of the benefits is smaller APK sizes to allow faster debug deployment cycles.

enter image description here

When creating a release build (typically through the archive/deploy process), the "Shared Mono Runtime" option is turned off so the APK produced is totally self-contained.

enter image description here

Note: When deploying from the VS IDE during debug sessions, the following APK packages are auto-installed when using the shared runtime:

  • Mono.Android.DebugRuntime
  • Mono.Android.Platform.ApiLevel_XX