Bug 17414 - Android.Util.AndroidRuntimeException: Loading... (ART with 4.12)
Summary: Android.Util.AndroidRuntimeException: Loading... (ART with 4.12)
Alias: None
Product: Android
Classification: Xamarin
Component: Pre-release ()
Version: 4.12.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2014-01-24 10:35 UTC by Joshua Rose
Modified: 2017-06-27 17:28 UTC (History)
3 users (show)

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

Visual Studio Exception (154.98 KB, image/png)
2014-01-24 10:35 UTC, Joshua Rose
Device log from crash (45.50 KB, text/plain)
2014-01-24 13:06 UTC, Joshua Rose

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:

Description Joshua Rose 2014-01-24 10:35:08 UTC
Created attachment 5910 [details]
Visual Studio Exception

During XamarinUniversity, course Android ListViews and Adapters

Device: Nexus 5 with ART
Xamarin.Android Version: 4.12
IDE: Visual Studio 2013

All labs worked excellent except lab 6

When tapping on any listItem, I get an exception in visual studio.

See the attached screenshot, let me know if you need more information.
Comment 1 Jonathan Pryor 2014-01-24 12:45:09 UTC
Note: I know XA 4.12 has a workaround to better run on ART, but you still shouldn't actually use ART unless you're a Google Partner or, well, me: http://source.android.com/devices/tech/dalvik/art.html

> Important: Dalvik must remain the default runtime or you risk breaking your
> Android implementations and third-party applications.

AndroidRuntimeException implies that _you_ did something wrong, i.e. a bug in your code. Unfortunately "Loading..." isn't a particularly useful message.

Please view/provide the full stack trace, as provided by Exception.ToString(). (Just click [Continue], let the app crash, and the crash log should contain the full stack trace.)
Comment 2 Joshua Rose 2014-01-24 13:06:37 UTC
Created attachment 5912 [details]
Device log from crash

Log attached for reference
Comment 3 Jonathan Pryor 2014-01-24 13:26:55 UTC
Here's the actual error:

> 01-24 12:58:00.330 I/MonoDroid( 5107): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?

I suspect that's actually an ART-related bug; have you tried using Dalvik?
Comment 4 Joshua Rose 2014-01-24 13:33:06 UTC

Dalvik works perfectly.

I don't need to use ART at the moment, I just switched it on after reading the 4.12 release notes and used it during the Xamarin University courses. I just thought I would share this as it appeared your team was actively working on ART support and might appreciate an enhanced feedback loop.

Comment 6 Chris Hardy [MSFT] 2017-06-27 17:28:16 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.