Xamarin android app throws ResourceNotFoundException

Since 1 week I discovered Xamarin framework, and my job is to make Android app work. iOS app has been already launched before.

I had to deal first with some NuGet Packages dependencies, but now the only exception I get is :

06-26 15:01:40.719 E/mono-rt (20038): [ERROR] FATAL UNHANDLED EXCEPTION: Android.Content.Res.Resources+NotFoundException: Resource ID #0x0
06-26 15:01:40.719 E/mono-rt (20038):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
06-26 15:01:40.719 E/mono-rt (20038):   at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (JniObjectReference instance, JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a7] in /Users/builder/data/lanes/3340/4e275588/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12083 
06-26 15:01:40.719 E/mono-rt (20038):   at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00000] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:444 
06-26 15:01:40.719 E/mono-rt (20038):   at Android.Runtime.JNIEnv.FinishCreateInstance (IntPtr instance, IntPtr jclass, IntPtr constructorId, Android.Runtime.JValue* constructorParameters) [0x0000b] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:339 
06-26 15:01:40.719 E/mono-rt (20038):   at Android.Support.V4.App.ActionBarDrawerToggle..ctor (Android.App.Activity activity, Android.Support.V4.Widget.DrawerLayout drawerLayout, Int32 drawerImageRes, Int32 openDrawerContentDescRes, Int32 closeDrawerContentDescRes) [0x00124] in <filename unknown>:0 
06-26 15:01:40.719 E/mono-rt (20038):   at Xamarin.Forms.Platform.Android.Platform.GetNewMasterDetailToggle () [0x00030] in <filename unknown>:0 
06-26 15:01:40.719 E/mono-rt (20038):   at Xamarin.Forms.Platform.Android.Platform.UpdateMasterDetailToggle (Boolean update) [0x00075] in <filename unknown>:0 
06-26 15:01:40.719 E/mono-rt (20038):   at Xamarin.Forms.Platform.Android.Platform.UpdateActionBar () [0x000a6] in <filename unknown>:0 
06-26 15:01:40.719 E/mono-rt (20038):   at Xamarin.Forms.Platform.Android.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x000bd] in <filename unknown>:0 
06-26 15:01:40.719 E/mono-rt (20038):   at Xamarin.Forms.Platform.Android.FormsApplicationActivity.InternalSetPage (Xamarin.Forms.Page page) [0x000b7] in <filename unknown>:0 
06-26 15:01:40.719 E/mono-rt (20038):   at Xamarin.Forms.Platform.Android.FormsApplicationActivity.SetMainPage () [0x0000c] in <filename unknown>:0 
06-26 15:01:40.719 E/mono-rt (20038):   at Xamarin.Forms.Platform.Android.FormsApplicationActivity.LoadApplication (Xamarin.Forms.Application application) [0x0002d] in <filename unknown>:0 
06-26 15:01:40.719 E/mono-rt (20038):   at savtime.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x0001e] in D:\sources\savtime-mobile\Droid\MainActivity.cs:27 
06-26 15:01:40.719 E/mono-rt (20038):   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:2426 
06-26 15:01:40.719 E/mono-rt (20038):   at (wrapper dynamic-method) System.Object:72e9ca78-aec6-45d3-82e8-45b117f59475 (intptr,intptr,intptr)
06-26 15:01:40.719 E/mono-rt (20038):   --- End of managed exception stack trace ---
06-26 15:01:40.719 E/mono-rt (20038): android.content.res.Resources$NotFoundException: Resource ID #0x0
06-26 15:01:40.719 E/mono-rt (20038):   at android.content.res.Resources.getValue(Resources.java:1243)
06-26 15:01:40.719 E/mono-rt (20038):   at android.content.res.Resources.getDrawable(Resources.java:766)
06-26 15:01:40.719 E/mono-rt (20038):   at android.content.Context.getDrawable(Context.java:402)
06-26 15:01:40.719 E/mono-rt (20038):   at android.support.v4.content.ContextCompatApi21.getDrawable(ContextCompatApi21.java:26)
06-26 15:01:40.719 E/mono-rt (20038):   at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:321)
06-26 15:01:40.719 E/mono-rt (20038):   at android.support.v4.app.ActionBarDrawerToggle.<init>(ActionBarDrawerToggle.java:277)
06-26 15:01:40.719 E/mono-rt (20038):   at android.support.v4.app.ActionBarDrawerToggle.<init>(ActionBarDrawerToggle.java:229)
06-26 15:01:40.719 E/mono-rt (20038):   at md5daa929973e91d615883be6545c9acbac.MainActivity.n_onCreate(Native Method)
06-26 15:01:40.719 E/mono-rt (20038):   at md5daa929973e91d615883be6545c9acbac.MainActivity.onCreate(MainActivity.java:29)
06-26 15:01:40.719 E/mono-rt (20038):   at android.app.Activity.performCreate(Activity.java:5975)
06-26 15:01:40.719 E/mono-rt (20038):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
06-26 15:01:40.719 E/mono-rt (20038):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)
06-26 15:01:40.719 E/mono-rt (20038):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
06-26 15:01:40.719 E/mono-rt (20038):   at android.app.ActivityThread.access$800(ActivityThread.java:147)
06-26 15:01:40.719 E/mono-rt (20038):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281)
06-26 15:01:40.719 E/mono-rt (20038):   at android.os

I saw many posts here and it seems to be an icon problem, but i've checked all resource definitions in the project, resource names, and everything seems to be fine.

Is it possible that this problem is caused by bad References (Like Xamarin Forms, or Iconize) ? Or this can be only because of missing resources ?

I've already clean my solution updated or downgraded my packages but nothing work..

I must also indicate that I use F# instead of C# to develop. And my views are made with XAML.

Finally found what is the problem.

First, I must set for all my resources files 'AndroidResource' in Build Action field (See in properties when you select a resource)

Second, I must not use other characters as A to Z, 0 to 9, and '_' to name my resources.

Error on adding Resources in visual studio 2017, I am using visual studio 2017 for xamarin Android development.Most of / 38038932/xamarin-android-app-throws-resourcenotfoundexception. Xamarin android app throws ResourceNotFoundException Since 1 week I discovered Xamarin framework, and my job is to make Android app work. iOS app has been already launched before. I had to deal first with some NuGet Packages dependencies, but now the only exception I get is :

This is what I did to resolve issue -

  1. I was missing "Xamarin.Android.Support.Animated.Vector.Drawable" NuGet package so I included it in my android project.For me correct version was 23.3.0 but it may be diffrent in your case.
  2. Deleted obj and bin folder for my android project.
  3. Restarted visual studio.
  4. Rebuild

Context.getDrawable() has thrown a Resources$NotFoundException, How to resolve android.content.res.Resources$NotFoundException at android. content.res. Xamarin android app throws ResourceNotFoundException. 3 Xamarin android app throws ResourceNotFoundException Jun 26 '16. 3 Xamarin android app throws ResourceNotFoundException Jun 28 '16. 3 PostgreSQL with docker ownership issue Sep 3 '19. 3 Custom RatingBar shows always five stars Mar 20 '15. 2 AbstractMet

Have You Tried This Delete The Content Out Your C:\Users\YOURUSER\AppData\Local\Xamarin\

Hundreds of Resource.Designer.cs build errors on latest Xamarin Forms 2.2.0.45

Xamarin.Android 10.1, Android 10.1.3.7 in Visual Studio 2019 verion 16.4.3 and Visual Studio 2019 for Mac Android 10.1.1.0 in Visual Studio 2019 for Mac version 8.4; December 10, 2019 AbstractMethodError was thrown if an app attempted to invoke a C# 8.0� Discussions about building Android apps with Xamarin.Android This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use.

The way i fixed a similar issue was by cleaning the project, rebuilding it and running it. Was a great tip from one of my colleagues.

IAmazonQLDB.GetBlock Method (GetBlockRequest), If the specified ledger doesn't exist or is in DELETING status, then throws ResourceNotFoundException . Supported in: Windows Store Apps Supported in: Xamarin Android Supported in: Xamarin iOS (Unified) Supported in: Xamarin. Forms� Xamarin android app throws ResourceNotFoundException Since 1 week I discovered Xamarin framework, and my job is to make Android app work. iOS app has been already launched before. I had to deal first with some NuGet Packages dependencies, but now the only exception I get is : 06-26 15:01:40.719 E/mono-rt

Journey through the hell of Android Wear development with Xamarin , When I started working on my first app for Android Wear 2.0, Xamarin to the project designer will throw a “Resource Not Found” exception� Xamarin.Android makes it possible for you to create native Android applications using the same UI controls as you would in Java, but with the flexibility and elegance of a modern language (C#), the power of the .NET Base Class Library (BCL), and a first-class IDE (Visual Studio) at your fingertips. This series introduces the basics of Xamarin.Android development. It takes you from setup and

Android vector drawable resource not found, Dec 29, 2016 � Images are used in android application to add-on more user The drawable should be in the resources folder of the xamarin. android:width Used to resource not found exception for Kitkat and below 0 Android App Crashes the context in which the drawable will be throw new XmlPullParserException("No� How to remove (Android) app title bar in Xamarin.Forms? Is there any chance that I can remove the title bar of the app in Xamarin.Forms? I am working on a Xamarin.Forms Portable project. I tried a lot of solutions, but neither worked, I couldn't even star

AmazonCognitoIdentityProviderClient.AdminInitiateAuthAsync , When I started to work on my first app for Android Wear 2.0, Xamarin to the project, designer will throw a “Resource Not Found” exception� I moved all my project files and my Android SDK, NDK's etc directly to C:. I also set my TEMP folder at C:TEMP. However, non of this seems to help. When I look at the line of code that gives this error, Visual Studio sends me to this line of code in Xamarin.Android.Common.targets.

Comments
  • for me, it was having my image name in camel case
  • I wasn't missing the vector support package, but geez, the amount of times that "nuke everything, restart, and rebuild" comes up as the solution in Xamarin is quite worrying. Fixed my issue as well after adding a bunch of icon resources...