android: Android Unit Test on Device F# crash: Resources NotFoundException
Steps to Reproduce
- Create an Android Unit Test project with F#
- Build and run on device
Expected Behavior
The Unit tests will run on the device
Actual Behavior
— End of managed Android.Content.Res.Resources+NotFoundException stack trace — android.content.res.Resources$NotFoundException: Resource ID #0x7f020003 at android.content.res.Resources.getValue(Resources.java:2485) at android.content.res.Resources.loadXmlResourceParser(Resources.java:4217) at android.content.res.Resources.getLayout(Resources.java:2301) at android.view.LayoutInflater.inflate(LayoutInflater.java:413) at android.view.LayoutInflater.inflate(LayoutInflater.java:366) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:450) at android.app.Activity.setContentView(Activity.java:2399) at md54f7330f059cfdce8608ce9cc3a0da7e3.MainActivity.n_onCreate(Native Method) at md54f7330f059cfdce8608ce9cc3a0da7e3.MainActivity.onCreate(MainActivity.java:29) at android.app.Activity.performCreate(Activity.java:6608) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3086) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3243) at android.app.ActivityThread.access$1000(ActivityThread.java:218) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1718) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6917) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Version Information
=== Visual Studio Professional 2017 for Mac ===
Version 7.4.2 (build 12) Installation UUID: 69cc42aa-2bc3-49e3-929b-43eb3dfdb0eb Runtime: Mono 5.8.1.0 (2017-10/6bf3922f3fd) (64-bit) GTK+ 2.24.23 (Raleigh theme)
Package version: 508010000
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 2.0.5 2.0.0 1.1.2 1.1.1 1.1.0 1.0.5 1.0.4 SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks SDK Versions: 2.1.4 2.0.0 1.0.4 1.0.1 1.0.0-preview2-1-003177 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.8.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.1 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Apple Developer Tools ===
Xcode 9.2 (13772) Build 9C40b
=== Xamarin.Mac ===
Version: 4.2.1.28 (Visual Studio Professional)
=== Xamarin.Android ===
Version: 8.2.0.16 (Visual Studio Professional) Android SDK: /Users/sam.williams/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 2.3 (API level 10) 5.0 (API level 21) 6.0 (API level 23) 7.0 (API level 24) 7.1 (API level 25) 8.0 (API level 26) 8.1 (API level 27)
SDK Tools Version: 25.2.5 SDK Platform Tools Version: 25.0.5 SDK Build Tools Version: 25.0.3
Java SDK: /usr java version “1.8.0_151” Java™ SE Runtime Environment (build 1.8.0_151-b12) Java HotSpot™ 64-Bit Server VM (build 25.151-b12, mixed mode)
Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL
=== Xamarin.iOS ===
Version: 11.9.1.24 (Visual Studio Professional) Hash: f62de472 Branch: xcode9.3 Build date: 2018-03-29 19:30:53-0400
=== Xamarin Inspector ===
Version: 1.4.0 Hash: b3f92f9 Branch: master Build date: Fri, 19 Jan 2018 22:00:34 GMT Client compatibility: 1
=== Build Information ===
Release ID: 704020012 Git revision: 0d8e3f0a4d683771f17959739956fa09c7ba21e3 Build date: 2018-03-30 10:45:17-04 Xamarin addins: 958839ea56ab1e331caf7c92b6ad50fb9e6ee9d2 Build lane: monodevelop-lion-d15-6
=== Operating System ===
Mac OS X 10.13.3 Darwin 17.4.0 Darwin Kernel Version 17.4.0 Sun Dec 17 09:19:54 PST 2017 root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
=== Enabled user installed addins ===
MvvmCross Template pack 2.0.1 Paket 0.3 xUnit.NET 2 testing framework support 0.7.5 Redth’s Addins 1.0.9 Straight8’s SpecFlow Integration 1.11.1.0 SpecFlow Support 1.10.0.0 Internet of Things (IoT) development (Preview) 7.1
Log File
Intentionally left blank, as the bug is reliably reproducible for me, and I don’t think device logs will help in the fix.
If they are required, I can update.
VS bug #660387
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 21 (15 by maintainers)
PR submitted.