Bug 17390 - Creating a new F# Android Unit Test project results in a Resource not found exception at runtime
Summary: Creating a new F# Android Unit Test project results in a Resource not found e...
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.10.2
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2014-01-23 03:52 UTC by Dave Thomas
Modified: 2014-08-08 08:08 UTC (History)
2 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 FIXED

Description Dave Thomas 2014-01-23 03:52:08 UTC
Steps to recreate:
1. Create new Solution: F# Android Unit Test Project
2. Run

Exception:

Android.Content.Res.Resources+NotFoundException: Exception of type 'Android.Content.Res.Resources+NotFoundException' was thrown. at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) [0x00084] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.2-branch/4b53fbd0/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:895 at Android.App.Activity.SetContentView (int) [0x00070] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.2-branch/4b53fbd0/source/monodroid/src/Mono.Android/platforms/android-17/src/generated/Android.App.Activity.cs:4132 at Xamarin.Android.NUnitLite.TestSuiteActivity.OnCreate (Android.OS.Bundle) <IL 0x0001b, 0x000c6> at AndTest.MainActivity.OnCreate (Android.OS.Bundle) [0x0000c] in /Users/dave/Projects/AndTest/AndTest/MainActivity.fs:20 at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.2-branch/4b53fbd0/source/monodroid/src/Mono.Android/platforms/android-17/src/generated/Android.App.Activity.cs:2119 at (wrapper dynamic-method) object.1fe181fc-1870-4b54-8497-b5a2fa8cc268 (intptr,intptr,intptr) <IL 0x00017, 0x0001f>    --- End of managed exception stack trace --- android.content.res.Resources$NotFoundException: Resource ID #0x7f020003 	at android.content.res.Resources.getValue(Resources.java:1118) 	at android.content.res.Resources.loadXmlResourceParser(Resources.java:2304) 	at android.content.res.Resources.getLayout(Resources.java:934) 	at android.view.LayoutInflater.inflate(LayoutInflater.java:395) 	at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267) 	at android.app.Activity.setContentView(Activity.java:1895) 	at andtest.MainActivity.n_onCreate(Native Method) 	at andtest.MainActivity.onCreate(MainActivity.java:28) 	at android.app.Activity.performCreate(Activity.java:5133) 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175) 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261) 	at android.app.ActivityThread.access$600(ActivityThread.java:141) 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256) 	at android.os.Handler.dispatchMessage(Handler.java:99) 	at android.os.Looper.loop(Looper.java:137) 	at android.app.ActivityThread.main(ActivityThread.java:5103) 	at java.lang.reflect.Method.invokeNative(Native Method) 	at java.lang.reflect.Method.invoke(Method.java:525) 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 	at dalvik.system.NativeStart.main(Native Method)
Comment 1 Sadik Ali 2014-02-24 07:29:50 UTC
I have checked this issue and noticed that above exception is generated when I run application.
Refer screen cast: http://screencast.com/t/1aIqSC0qES7v
Comment 2 Atsushi Eno 2014-02-24 08:42:51 UTC
This won't be worked on until we get monodevelop fsharp branch merged into master.
Comment 3 Atsushi Eno 2014-08-08 08:08:21 UTC
This specific issue should be fixed in master. [after 8298122 and 65b7685]