Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android App Compile Not Generating Package Resources

When attempting to compile my Xamarin.Android app I get the compile error:

Error 3 The file "obj\Debug\android\bin\packaged_resources" does not exist. MyApp.UI.Droid

This error occurred after I made some changes (added some new classes - cannot remember what it was). But I didn't change any project settings, nor go delete actual files in the obj folder.

What is the cause of this error and how can I fix this?

Some information that may be useful:

  • The project is a Cross-Platform PCL project - Core, Android, and iOS Projects
  • The project uses MVVM Cross
like image 502
sazr Avatar asked Aug 30 '15 02:08

sazr


3 Answers

I encountered the same issue. Ensure that your resource files do not include any special characters

The actual error you may be encountering is:

Invalid file name: must contain only [a-z0-9_.]

Change your build output verbosity in visual studio to see better log output.

like image 147
Chad Bonthuys Avatar answered Nov 12 '22 04:11

Chad Bonthuys


I´ve had the same issue.

Then i´ve reviewed my resource file names.

Solution:

One file was using "-" in it´s name. (invalid character)

Then i replaced for "_" (underline).

PS:

=> file name: must contain only [a-z0-9_.]

like image 32
gabrielbarceloscn Avatar answered Nov 12 '22 04:11

gabrielbarceloscn


You will need to grub down by switching on Verbose output. What is stopping the generation of packaged_resources?

In VS2013 choose Tools --> Options --> Build and execute, choose verbosity Diagnostic.

In VS2015, the same option is in Tools --> Options --> Projects and Solutions --> Build and Run.

In my case, it was a hyphen character in the name of the action property of an Intent filter, but choosing verbose output will point you to the line that has the problem.

like image 17
bbsimonbb Avatar answered Nov 12 '22 03:11

bbsimonbb