Reputation: 422
I uninstalled Xamarin on Mac. Then re-installed it. 6.1.4 (Build1). Now I created a new Solution. With Portable Class Library selected. Then I compiled. Then I installed on simulator running on same machine. But at the launch itself the App failed. Then I checked Application Output. Below is the log. I am not able to proceed. Please help. I checked: "Xamarin.Android API-23 Support" and "Mono runtime" are installed on the simulator android. (Uninstalling these components also did not solve)
Thanks in advance.
Below is the log:
am start -n "in.test.buttonlogger/md50a143af76fade5fdcdfca266ac349d28.MainActivity"
Starting: Intent { cmp=in.test.buttonlogger/md50a143af76fade5fdcdfca266ac349d28.MainActivity }
[art] Not late-enabling -Xcheck:jni (already on)
[art] Unexpected CPU variant for X86 using defaults: x86
[AndroidRuntime] Shutting down VM
[AndroidRuntime] FATAL EXCEPTION: main
[AndroidRuntime] Process: in.kosi.buttonlogger, PID: 6621
[AndroidRuntime] 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!
[AndroidRuntime] at android.app.ActivityThread.installProvider(ActivityThread.java:5856)
[AndroidRuntime] at android.app.ActivityThread.installContentProviders(ActivityThread.java:5445)
[AndroidRuntime] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5384)
[AndroidRuntime] at android.app.ActivityThread.-wrap2(ActivityThread.java)
[AndroidRuntime] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
[AndroidRuntime] at android.os.Handler.dispatchMessage(Handler.java:102)
[AndroidRuntime] at android.os.Looper.loop(Looper.java:154)
[AndroidRuntime] at android.app.ActivityThread.main(ActivityThread.java:6119)
[AndroidRuntime] at java.lang.reflect.Method.invoke(Native Method)
[AndroidRuntime] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
[AndroidRuntime] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
[AndroidRuntime] Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_24 or Xamarin.Android.Platform!
[AndroidRuntime] at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:38)
[AndroidRuntime] at android.app.ActivityThread.installProvider(ActivityThread.java:5853)
[AndroidRuntime] ... 10 more
[AndroidRuntime] Caused by: android.content.pm.PackageManager$NameNotFoundException: Xamarin.Android.Platform
[AndroidRuntime] at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:345)
[AndroidRuntime] at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:327)
[AndroidRuntime] at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:32)
[AndroidRuntime] ... 11 more
Upvotes: 0
Views: 1842
Reputation: 3230
When you experience this issue, the normal solution is to simply edit the AndroidUseLatestPlatformSdk
property in your .csproj
file for the given project to false
as follows:
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
If that doesn't work, then try disabling Shared Runtime
in the Project Properties
under Android Options
.
As a last option, you can also try to decrease your Target Framework
in the Project Properties
under General
.
Upvotes: 2