Smac
Smac

Reputation: 401

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

I'm developing an Android app using C# and it initially was building perfectly. I closed down Visual Studio 2015 and re-opened it, tried to build and I am now presented with the following error

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

I have not added or deleted any files.

Help would be greatly appreciated

Upvotes: 2

Views: 3643

Answers (7)

Junaid Pathan
Junaid Pathan

Reputation: 4316

This was due to a bug in Visual Studio 2022. I uninstalled the MAUI workload as well as whole Visual Studio 2022, and then reinstalled both again. The error was gone in Visual Studio 2022 v17.12.4. You might need to uninstall and reinstall your version of VS again. Try this if none of the solutions work.

Upvotes: 0

mina_anwer
mina_anwer

Reputation: 91

i have the same problem before , i discovered that the main reason is that i added anew Image resource and contains "-" , which cause error , try to take care of your resources as xamarin maps it to variables in memory and some times its name cause errors

Upvotes: 0

1iveowl
1iveowl

Reputation: 1732

I fixed this by installing the latest version of the Android SDK Build Tool:

enter image description here

Upvotes: 0

Vítor Oliveira
Vítor Oliveira

Reputation: 2091

Check if you have some file with "-" like "icon-test.png" and change to "_" like "icon_test.png".

You can also check if you have some blank space in name files.

Upvotes: 2

Dragana
Dragana

Reputation: 63

My problem was that I had wrong format of Android Version number in Android Manifest. You have to use integer values for Android Version number.

Upvotes: 3

Ameya Sawant
Ameya Sawant

Reputation: 43

i have fixed this issue. Check to see if there are any unused entries in resources.designer.cs if there are any manually remove those entries. This will fix the issue.

Upvotes: 0

Jon Douglas
Jon Douglas

Reputation: 13176

You can find a bug report on this issue:

https://bugzilla.xamarin.com/show_bug.cgi?id=55232

The main cause of this issue is that the aapt errors are not being propagated to the Error List. Thus it is difficult to debug and requires a bit more attention.

You can get your Diagnostic Build Output via the following:

https://developer.xamarin.com/guides/android/troubleshooting/troubleshooting/#Diagnostic_MSBuild_Output

Once you have that, you should be able to view APT errors inside the log which will tell you why the aapt task has failed. You need to correct these to then generated a new Resource.designer.cs file. Otherwise it will continue to throw the error MSB3375: The file "obj\Debug\android\bin\packaged_resources" does not exist. error.

Upvotes: 0

Related Questions