Bug 17525 - Use latest SDK is broken, inconsistent
Summary: Use latest SDK is broken, inconsistent
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.10.2
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-01-30 18:15 UTC by Mikayla Hutchinson [MSFT]
Modified: 2017-08-07 20:49 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Mikayla Hutchinson [MSFT] 2014-01-30 18:15:17 UTC
When a project is set it "use latest SDK", 4.10.2 will use the 4.3 framework assemblies (API 18) even if API 19 is installed, because 4.10.2 does not support API 19. This is expected behaviour.

HOWEVER the compiled app still seems to depend on Mono.Android.Platform.ApiLevel_19, which is inconsistent and causes a crash when launching the app on device:

E/AndroidRuntime( 2000): FATAL EXCEPTION: main
E/AndroidRuntime( 2000): Process: AndroidTest.AndroidTest, PID: 2000
E/AndroidRuntime( 2000): java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.DebugRuntime or Mono.Android.Platform.ApiLevel_19!
E/AndroidRuntime( 2000): 	at android.app.ActivityThread.installProvider(ActivityThread.java:4774)
E/AndroidRuntime( 2000): 	at android.app.ActivityThread.installContentProviders(ActivityThread.java:4366)
E/AndroidRuntime( 2000): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4306)
E/AndroidRuntime( 2000): 	at android.app.ActivityThread.access$1400(ActivityThread.java:135)
E/AndroidRuntime( 2000): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1457)
E/AndroidRuntime( 2000): 	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2000): 	at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2000): 	at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 2000): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2000): 	at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 2000): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 2000): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 2000): 	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2000): Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.DebugRuntime or Mono.Android.Platform.ApiLevel_19!
E/AndroidRuntime( 2000): 	at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:30)
E/AndroidRuntime( 2000): 	at android.app.ActivityThread.installProvider(ActivityThread.java:4771)
E/AndroidRuntime( 2000): 	... 12 more
E/AndroidRuntime( 2000): Caused by: android.content.pm.PackageManager$NameNotFoundException: Mono.Android.Platform.ApiLevel_19
E/AndroidRuntime( 2000): 	at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:227)
E/AndroidRuntime( 2000): 	at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:22)
E/AndroidRuntime( 2000): 	... 13 more
Comment 1 Ram Chandra 2014-03-06 10:23:53 UTC
I tried to reproduce this issue as mention in bug description but i am not able to reproduce this issue. I have created a "Sample application" and it is deployed successfully on device (Samsung S4) without any error or exception.

screencast: http://www.screencast.com/t/Vt5Z2PTHb

Environment:

Mac
Xamarin Studio 4.2.3 (build 59)
Xamarin.Android: 4.10.2

I have also checked this issue with  Xamarin.Android: 4.12.1

Please let me know if I have to check this issue with specific project ?
Comment 2 Jon Douglas [MSFT] 2017-08-07 20:49:02 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Android. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.