Skip to content Skip to sidebar Skip to footer

Visual Studio 2017 - Xamarin - The File "obj\debug\android\bin\packaged_resources" Does Not Exist

I'm fighting with that issue for 2 days already and can't find any solution. I have an Xamarin Android app in Visual Studio 2017 consisting of three projects: Xamarin.Android proj

Solution 1:

I've finally found what was the issue. It wasn't related to any component from SDK Manager or VS version.

Following localization tutorial from developer.xamarin.com, I played a bit with Strings.xml in my Android project. I wanted to have my Activities Label taken from resources as well, so in the ActivityAttribute I defined:

[Activity(Label = "@string/peopleListTitle")]

and added this value in Strings.xml file:

<?xml version="1.0" encoding="utf-8"?><resources><!-------Other resources values -----><stringname="peopleListTitle">People List</string></resources>

In that case my build is failing with above-mentioned error:

The file "obj\Debug\android\bin\packaged_resources" does not exist

When I change ActivityAttribute to use a string directly:

[Activity(Label = "People List")]

the build is passing without any issues.

I managed to find a solution, but actually I don't know why it's not building when I try to use Label text defined in Strings.xml.

BTW, I managed to find what's the problem by setting build output verbosity to Diagnostic in Tools -> Options -> Projects and Solutions -> Build and Run which gives a detailed info why the build failed in the Output window.

Solution 2:

I had the same problem. After removing the dash "-" sign from the image file name, the problem is solved. Bad error message! It should not be:

The file "obj\Debug\android\bin\packaged_resources" does not exist.

Writing an error message like this causing the Developer to think about something else while the problem is the illegal file name.

Solution 3:

I had the same issue when I added a new image as a resource. There was a '-' in the file name (Invalid resource name character). I renamed & removed that character and all good. Resource name can only consist of 0-9,a-z or A-Z or combination of any.

Solution 4:

I had the same problem, and i removed all image file name have "-" character. My problem solved

Solution 5:

Another reason for this error is that you may have a float number as your version number. In my case I changed it to a integer and everything worked fine. (I found the error by switching the build output to Detailed)

Post a Comment for "Visual Studio 2017 - Xamarin - The File "obj\debug\android\bin\packaged_resources" Does Not Exist"