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

  • Question

  • User113503 posted

    I just bought an Indie license for Android and I receive the following error when I build a fresh new project in Xamarin Studio

    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB6006: aapt.exe is afgesloten met code -1073741819. (MSB6006) (Dime.Scheduler)

    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB3375: The file "obj\Debug\android\bin\packaged_resources" does not exist. (MSB3375) (Dime.Scheduler)

    More details about the build are in the attachment. Being a complete newbie to the mobile app development, I have no idea where to look and what to do next.

    Saturday, March 26, 2016 10:57 PM

All replies

  • User187346 posted

    You probably have an invalid character in you manifest file or one of your resources has an invalid character in its name. File names can't contain '-'

    The full error message is included in the text file you provided, you need to review it. also take a look at this topic as there maybe an error in the generated manifest file.

    Sunday, March 27, 2016 10:28 AM
  • User205039 posted

    Please Send me Solution :- Error 109 The file "obj\Debug\android\bin\packaged_resources" does not exist.

    Monday, March 28, 2016 9:11 AM
  • User7094 posted

    I am facing the same problem , a few weeks ago , and Could not find a solution till now.

    Monday, March 28, 2016 7:16 PM
  • User79551 posted

    You will need to grub down. What is stopping the generation of packaged_resources? In Visual, Tools --> Options --> Build and execute, choose verbosity Diagnostic. In my case, it was a hyphen character in the name of the action property of an Intent filter.

    Friday, April 1, 2016 12:37 AM
  • User7094 posted

    Guys, thanks god. I solved my problem. It was only a matter of the right choose of android SDKs.

    At the first i selected randomly several APIs and build tools, indiscriminately.

    Then , after a new installation of windows and Xamarin , from the scratches , i Realized Which items was correct, in my case , and selected items only this:

    • Tools/ Tools/Android SDK Tools 25.1.1 Tools/Android SDK Plataform-tools 23.1 Tools/Android SDK Build-tools 23.0.1

    • Android 6.0/ Android 6.0/SDK Android 6.0/ARM EABI v7a System Image

    • Android 5.1.1/ Android 5.1.1/SDK Android 5.1.1/ARM EABI v7a System Image

    • Android 4.2.2/ Android 4.4.2/SDK Android 4.4.2/ARM EABI v7a System Image

    • Android 4.0.3/ Android 4.0.3/SDK Android 4.0.3/ARM EABI v7a System Image

    • Extras/ Extras/Android Support Library Extras/Google USB Driver

    So what i realized, this error, maybe can be caused by randomly checked items in Android SDK Manager.

    Hope this can help you guys.

    Tuesday, April 12, 2016 3:15 PM
  • User202754 posted

    @angelocarlotto Omg thank you!! Searched for this for so long!

    Friday, April 15, 2016 2:46 PM
  • User213952 posted

    @angelocarlotto

    Tks! I spent few days searching the answer for this problem!!!

    Saturday, April 23, 2016 7:43 PM
  • User209660 posted

    Thanks God before anything!

    @angelocarlotto Man, you're a time saver! You saved me from a windows format!

    Huge thanks!

    Wednesday, May 25, 2016 11:16 AM
  • User38558 posted

    Visual Studio 2015 - Community Edition - Update 1 w/Xamarin installed

    I am getting this same exact here, "Xamarin.Android.Common.targets(1691,3): error MSB3375: The file "obj\Debug\android\bin\packaged_resources" does not exist" on a newly created project where I haven't touched a thing except to run the original template as-is! This shouldn't be!

    I have ran through the above recommendations and I am still having this issue! This is on a new project where I went to File -> Project -> Android -> Blank App (Android) And then clicked the run button to run the new app. Nothing was edited. Should run out of the box, right? I've attached all information I could think of that might help to resolve this issue. Let me know what other info would be helpful. Thanks!

    Monday, May 30, 2016 2:42 AM
  • User38558 posted

    Correction! I'm using Visual Studio 2015 Update 2!

    Monday, May 30, 2016 5:32 AM
  • User39110 posted

    @SamWalters
    Dear Sam, I am facing exact the same issue, Is there any solution you got? please let me know if yes, Thanks in advance

    Monday, May 30, 2016 8:05 AM
  • User38558 posted

    I believe I have resolved this issue. I gave up with trying to fix this one issue and I just uninstalling anything having to do with Android and then reinstalling Xamarin Android and the Xamarin Android Player.

    If you're on Windows 10, just go to your Programs and Features list and uninstall anything having to do with Android and Xamarin! You DO NOT need to uninstall Visual Studio 2015!!! DO NOT UNINSTALL VISUAL STUDIO 2015!!!

    DO NOT UNINSTALL VISUAL STUDIO 2015!!!! Xamarin and Android are just plugins to Visual Studio! VS2015 is NOT the problem here!

    If you had to "un-check" the Hyper-V to disable it, you will need to reboot your computer before running your app!

    After uninstalling these apps, go to xamarin.com and download their latest xamarin platform for VS2015 and re-install it! You'll also need to reinstall the xamarin android player at www.xamarin.com/android-player

    This appears to work for me thus far! Will let you know if I find out different as I haven't really dug in much other than running the original "Hello World" template app that was created with a new Xamarin blank Android project.

    Hope this helps!

    Monday, May 30, 2016 10:45 AM
  • User224960 posted

    I am facing the same issue(The file "obj\Debug\android\bin\packaged_resources" does not exist. MSFoodCourt.Droid )..after following all the steps you have provided, the issue still persists. Any other pointer t fix the issue, please let me know

    Tuesday, June 7, 2016 6:08 AM
  • User210122 posted

    :( I am very tired of this issue. Because I need to continue doing my work :( :(

    Tuesday, June 7, 2016 11:54 AM
  • User210122 posted

    I just resolved this issue. it works for me

    Tuesday, June 7, 2016 1:54 PM
  • User208965 posted

    @TrucNguyen Thanks, it works!

    Tuesday, June 7, 2016 2:26 PM
  • User231365 posted

    I tried everything what is here or on another forums (StackOverflow etc.) and always there are some errors. I reinstal several times Android SDK, even VS2015, tried to install only recomended tools and packages - nothing works. Once there is a problem with Android Emulator, another time app.exe exited with code 1073741816, then the file obj debug android bin packaged resources does not exit. I am so tired for looking working solution. I think I better learn Java and use this language for developing for Andorid as never ending buggs.

    Thursday, June 9, 2016 6:44 PM
  • User231801 posted

    Thanks @TrucNguyen, after I deleted the issue was resolved :dizzy:

    Tuesday, June 14, 2016 6:20 PM
  • User225454 posted

    Yes I also found the same as @TrucNguyen by accident.

    Would have saved me a few days if I would have come here first!

    Wednesday, June 15, 2016 1:30 PM
  • User118541 posted

    @TrucNguyen I also had to remove the Android SDK Build Tools in the Tools folder rev 24 and i solved my problem thanks

    Thursday, June 16, 2016 12:38 AM
  • User234440 posted

    @TrucNguyen @CostasAletrari Removing the preview tools package and rev 24 worked for me - very helpful, thanks!!

    Friday, June 17, 2016 4:55 PM
  • User169500 posted

    For me, uninstalling the Android SDK Build-tools 24 fixed the problem.

    Saturday, June 18, 2016 8:18 PM
  • User159951 posted

    @angelocarlotto's fix solved the problem for me.

    Monday, June 20, 2016 6:38 AM
  • User230160 posted

    Ok guys i think i know what the problem is here.

    First of all go and deinstall preview tools in your android sdk manager. If you havent installed it but still get the same error then go and deinstall Android SDK Build Tools Rev. 24.

    The Problem we have here is that, if you have Appcombat, RecyclerView or something like that in your project, the library rev of these librarys are below rev 24. They are still on 23.2.1 but not on rev 24. So if you installed Build-Tools Rev 24 and want to build your project the build cant find the rev24 resource package of your librarys.

    You can check it on your own Go in the SDK Manager and check "Obsolete" Then go to the folder Extras and there you can see "Android Support Library (Obsolete) Rev 23.2.1. And then check if there is Android Support Library Rev 24 in your Extras Folder. No? And thats the Problem here. We got the Update for Build Tools to early and have to wait for Library Update. Then we all can use Build Tools 24!

    So only update to BuildTools Rev 24 when we got an update for support librarys and have the rev24 librarys.

    Cheers Lads

    Tuesday, June 21, 2016 7:34 AM
  • User191123 posted

    @LukasReiner said: Ok guys i think i know what the problem is here.

    First of all go and deinstall preview tools in your android sdk manager. If you havent installed it but still get the same error then go and deinstall Android SDK Build Tools Rev. 24.

    The Problem we have here is that, if you have Appcombat, RecyclerView or something like that in your project, the library rev of these librarys are below rev 24. They are still on 23.2.1 but not on rev 24. So if you installed Build-Tools Rev 24 and want to build your project the build cant find the rev24 resource package of your librarys.

    You can check it on your own Go in the SDK Manager and check "Obsolete" Then go to the folder Extras and there you can see "Android Support Library (Obsolete) Rev 23.2.1. And then check if there is Android Support Library Rev 24 in your Extras Folder. No? And thats the Problem here. We got the Update for Build Tools to early and have to wait for Library Update. Then we all can use Build Tools 24!

    So only update to BuildTools Rev 24 when we got an update for support librarys and have the rev24 librarys.

    Cheers Lads

    Is there a way to downgrade to some earlier version?

    When I delete the Android SDK Platform-tools and Android SDK Build-tools Rev 24 and try to deploy to my android, it just fails without any errors.

    Tuesday, June 21, 2016 2:24 PM
  • User235611 posted

    Hi, Create folder 'packagedresources' in [project folder or startup project]\obj\Debug\android\bin\ packagedresources :) Works for me.

    Tuesday, June 21, 2016 2:54 PM
  • User230160 posted

    you dont need to downgrade. And you dont need to delete platform tools. Only delete build tools because onnly build tools need library rev 24. Platformtools dont need that so you can leave it on rev 25? I guess

    Tuesday, June 21, 2016 3:17 PM
  • User25759 posted

    Read through the technical bulletin about SDK 24: https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/

    Wednesday, June 22, 2016 4:42 PM
  • User122410 posted

    Xamarin has released a bulletin for this issue as it pertains to SDK 24 https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/

    There's a bug filed and it lists a couple workarounds.

    Wednesday, June 22, 2016 4:51 PM
  • User22177 posted

    @LukasR said: Ok guys i think i know what the problem is here. [...] So only update to BuildTools Rev 24 when we got an update for support librarys and have the rev24 librarys.

    Thanks, that solved my problem!

    Monday, June 27, 2016 12:04 PM
  • User230160 posted

    @JFMG said:

    @LukasR said: Ok guys i think i know what the problem is here. [...] So only update to BuildTools Rev 24 when we got an update for support librarys and have the rev24 librarys.

    Thanks, that solved my problem!

    No Problem!

    Monday, June 27, 2016 12:43 PM
  • User237453 posted

    @TrucNguyen said: I just resolved this issue. it works for me

    Thanks, that solved my problem!

    Tuesday, June 28, 2016 3:15 AM
  • User140054 posted

    Does anyone have a screen show showing how their Android SDK Manager is configured? I have tried just about every combination. Here is a screen shot showing my current config. By the way, this error is occurring for me when I try to add Images to any of my Resources folders.

    Any help is much appreciated. Thanks!

    Tuesday, June 28, 2016 3:00 PM
  • User140054 posted

    OK, after downgrading my Android SDK Tools, Platform Tools and Build Tools the problem was only ever resolved once I realized that some of the new images I was adding to my app included hyphens in the filename. Here is one of the file names.

    Add-Earth485p.png

    The hyphen in the filename produced these errors.

    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB3375: The file "obj\Debug\android\bin\packaged_resources" does not exist. (MSB3375) (FaceOffers.Droid)

    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB6006: "aapt.exe" exited with code 1. (MSB6006) (FaceOffers.Droid)

    For anyone that wants instructions on how to downgrade, here are some good links to use. This is for Windows.

    SDK Tools http://dl-ssl.google.com/android/repository/tools_r25.1.1-windows.zip

    Installation http://forums.xamarin.com/discussion/42333/not-yet-compatible-android-sdk-tools-rev-24-3/p1

    Platform Tools http://dl-ssl.google.com/android/repository/platform-tools_r23.1.0-windows.zip

    Installation http://stackoverflow.com/questions/9555337/how-to-downgrade-my-sdk-version

    Build Tools http://dl-ssl.google.com/android/repository/build-tools_r23.0.1-windows.zip

    Tuesday, June 28, 2016 7:31 PM
  • User233744 posted

    I had this error today, but nothing seemed to be up with the Build Tools I was using. Some StackOverflow post told me I should try Verbose debugging in Visual Studio; the aapt.exe error will be one line above the error message. Turns out I messed something up with my AndroidManifest.xml.

    Tuesday, June 28, 2016 9:03 PM
  • User38861 posted

    @LukasR said: Ok guys i think i know what the problem is here.

    First of all go and deinstall preview tools in your android sdk manager. If you havent installed it but still get the same error then go and deinstall Android SDK Build Tools Rev. 24.

    The Problem we have here is that, if you have Appcombat, RecyclerView or something like that in your project, the library rev of these librarys are below rev 24. They are still on 23.2.1 but not on rev 24. So if you installed Build-Tools Rev 24 and want to build your project the build cant find the rev24 resource package of your librarys.

    You can check it on your own Go in the SDK Manager and check "Obsolete" Then go to the folder Extras and there you can see "Android Support Library (Obsolete) Rev 23.2.1. And then check if there is Android Support Library Rev 24 in your Extras Folder. No? And thats the Problem here. We got the Update for Build Tools to early and have to wait for Library Update. Then we all can use Build Tools 24!

    So only update to BuildTools Rev 24 when we got an update for support librarys and have the rev24 librarys.

    Cheers Lads

    Thank you ! . It solved my probem. :)

    Friday, July 1, 2016 6:03 AM
  • User238773 posted

    Severity Code Description Project File Line Error The "Aapt" task failed unexpectedly. System.IO.FileNotFoundException: Could not find file 'C:\Users\Nixon\AppData\Local\Temp\4hhvqd3o.l02\resources.apk.bk'. File name: 'C:\Users\Nixon\AppData\Local\Temp\4hhvqd3o.l02\resources.apk.bk' at System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at Xamarin.Android.Tools.Files.CopyIfZipChanged(String source, String destination) at Xamarin.Android.Tasks.Aapt.ExecuteForAbi(String abi) at Xamarin.Android.Tasks.Aapt.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d26.MoveNext() TipCalc

    Saturday, July 2, 2016 5:15 AM
  • User226521 posted

    Just Remove that buildRools Rev 24 and works like a charm,.... Thanks lot. Satch

    Monday, July 11, 2016 9:52 PM
  • User238864 posted

    Yep, just remove build tools r24. Please fix this Xamarin!

    Tuesday, July 12, 2016 4:22 AM
  • User111009 posted

    Yes, build tools r24 is the culprit. Please remove and try rebuilding.

    Tuesday, July 12, 2016 4:30 AM
  • User242720 posted

    I have added JPG file to the drawable folder and caused this issue.. Removed it has resolved the issue..

    Monday, July 18, 2016 3:39 AM
  • User78086 posted

    It looks like this is fixed in "24.0.1"

    Tuesday, July 19, 2016 1:58 AM
  • User150915 posted

    Hello Guys,

    I deleted the rev 24 but i still have the issue when i try to build in release mode...

    Wednesday, July 27, 2016 8:53 PM
  • User160793 posted

    @vsg24 Sweet! This solved my issue.

    Friday, July 29, 2016 11:26 AM
  • User225793 posted

    @qusayhamad said:

    @TrucNguyen said: I just resolved this issue. it works for me

    Thanks, that solved my problem!

    Tanks, resolve to me!!! i'm one week with this error. tks :DDD

    Wednesday, August 24, 2016 7:10 PM
  • User155472 posted

    I had the same issue. Mine was causing by underscore ("_") in some icon names. Renamed the icons and all good. Dave

    Thursday, September 8, 2016 11:55 PM
  • User214132 posted

    I resolved it by removing portable library that contains the business logic from the android and then rebuild it separately. After rebuilding, clean your android project and add reference again to your portable class library. Finally build the android project.

    Saturday, September 17, 2016 2:31 PM
  • User265551 posted

    OK guys! thanks!@angelocarlotto,I solved my problem by your way!

    Friday, October 14, 2016 3:26 AM
  • User256940 posted

    One more suggestion for developers, who did not find solution above (I too). When I got 'The file "obj\Debug\android\bin\packagedresources" does not exist' I tried to rollback source code to old one (so old as it was possible) and found, that there is no error mentioned. So the problem probably was not with Android SDK. I started to check newer versions of code (binary search :) ) and finally found two closest revisions of source codes, where older copy does not have error, but newer one does. The problem was in NAME OF ADDED IMAGE in '...Droid\Resources\drawable\' - it contained '-' (minus) in name, 'btn-refresh.png'. I have renamed it to 'btnrefresh.png' - and all ok. Many hours spent !#^"%;!"?; !

    Saturday, October 15, 2016 6:18 PM
  • User256940 posted

    @JodiBennett - I found same solution too, finally. I found two closest revisions of source codes, where older copy does not have error, but newer one does. The problem was in name of added image, containing '-'. I have changed it to '_' - and all ok. Hours has been spent !#^"%;!"?; !

    Saturday, October 15, 2016 6:23 PM
  • User260179 posted

    I got that error after importing a config.target file with following settings, switching generated files to be created on a RAM disc:

    E:\$(SolutionName)\$(ProjectName)\bin\$(Configuration)\ E:\$(SolutionName)\$(ProjectName)\obj\$(Configuration)\ $(BaseIntermediateOutputPath)\

    After removing the import everything works fine as before. For me it looks like hard coded directories in a build script.

    Monday, October 24, 2016 6:48 PM
  • User236483 posted

    Srikanthbollojula probably your file has "-" or another special character not allowed.

    Thank you @MichaelShelestov , I installed a file wich the O.S. renamed and I did not see it, now is resolved.

    Is dificult to discover it because the error not occours when you add the wrong file, just when you clean the project and try to build. I rarely clean the project, I did it only because my icons was not updating, just because the new wrong file...

    Saturday, November 19, 2016 1:08 AM
  • User275934 posted

    I just removed the '-' (special character) from all the resources names. and It worked like charm :)

    Wednesday, November 23, 2016 11:15 AM
  • User28603 posted

    Thank you!!

    Saturday, November 26, 2016 5:42 AM
  • User273906 posted

    Had the same errors after editing the AndroidManifest.xml adding <activity android:windowSoftInputMode="stateHidden"></activity> Removing this line gets rid of the errors

    Errors: The file "obj\Debug\android\bin\packaged_resources" does not exist "aapt.exe" exited with code 1

    VS2015 Update3 Xamarin 4.2.1.58 Xamarin Android 7.0.2.37

    Please fix!

    Thursday, December 8, 2016 12:15 AM
  • User262824 posted

    @ArthurMoreira Thank you so much, My problem was that my intent filters has spaces. Thanks bro

    Saturday, January 21, 2017 10:05 PM
  • User298429 posted

    @vsg24 said: You probably have an invalid character in you manifest file or one of your resources has an invalid character in its name. File names can't contain '-'

    The full error message is included in the text file you provided, you need to review it. also take a look at this topic as there maybe an error in the generated manifest file.

    Got the same problem, got a '-' in one of my image files in the Resource folder, removed it and it was fixed.

    Wednesday, March 22, 2017 3:57 PM
  • User274546 posted

    The problem here may be various things. So you should always try first with setting output verbosity to diagnostic (Tools -> Options -> Projects and solutions -> Build and run) and inspecting the output. It will tell you if you're having resource with '-' or missing some resource or anything else.

    Thursday, March 23, 2017 4:18 PM
  • User220999 posted

    Thanks Vahid Amiri Motlagh[vsg24]

    I was able to resolved by issue by renaming the file. The issue was as you pointed out: "You probably have an invalid character in you manifest file or one of your resources has an invalid character in its name. File names can't contain '-'"

    The full error message is included in the text file you provided, you need to review it. also take a look at this topic as there maybe an error in the generated manifest file.

    Friday, March 31, 2017 10:53 AM
  • User300571 posted

    I fixed this error by getting someone on my team to send me the file from his project.

    Friday, April 7, 2017 8:40 AM
  • User250236 posted

    @Quakeulf said: I fixed this error by getting someone on my team to send me the file from his project.

    it worked mate, thanks!!!

    Actually, if I clean the problem comes back. So it didn't really fixed my problem.

    Monday, April 10, 2017 1:02 PM
  • User78064 posted

    I still have the problem, tried several solutions proposed in the article but none solved for me.

    Can anybody help me?

    Thanks.

    Monday, April 10, 2017 1:20 PM
  • User250236 posted

    Friday and Monday lost

    Monday, April 10, 2017 2:06 PM
  • User78064 posted

    I was able to solve this problem in specific.

    It was a problem in AXML. In my case it was an 'android: layout_alignLeft = "true"' within a LinearLayout.

    Leave verbosity enabled, including no Xamarin Diagnostics (Tools> Options> Xamarin> Android Settings).

    In Output find Error description:

    Monday, April 10, 2017 2:25 PM
  • User250236 posted

    @beguede said: I was able to solve this problem in specific.

    It was a problem in AXML. In my case it was an 'android: layout_alignLeft = "true"' within a LinearLayout.

    Leave verbosity enabled, including no Xamarin Diagnostics (Tools> Options> Xamarin> Android Settings).

    In Output find Error description:

    thanks matie, you helped solve mine

    I had this on a .xml file

    "item name="indeterminateTintMode" src_atop item" "item name="indeterminateTint" @color/white item"

    I did like you suggested to find the bug removed that and it worked!!! thanks!

    Monday, April 10, 2017 2:31 PM
  • User93424 posted

    Had the same problem. My error was in the manifest: I had Version Code (Version number) set at "1.0.0" and it wasn't allowed. It only takes integers so I had to revert to "1".

    I mixed up Version Code and Version Name.

    Tuesday, April 11, 2017 3:51 PM
  • User290195 posted

    i solved this . just select proper android compiled vesion

    oper android compiled vesion

    Thursday, April 13, 2017 11:01 AM
  • User78532 posted

    @angelocarlotto thanx brother. Worked for me. Didn't need any re-install. Thanks a lot

    Thursday, April 13, 2017 7:16 PM
  • User302739 posted

    ..

    Tuesday, April 18, 2017 9:32 AM
  • User316886 posted

    @MichaelShelestov said: One more suggestion for developers, who did not find solution above (I too). When I got 'The file "obj\Debug\android\bin\packagedresources" does not exist' I tried to rollback source code to old one (so old as it was possible) and found, that there is no error mentioned. So the problem probably was not with Android SDK. I started to check newer versions of code (binary search :) ) and finally found two closest revisions of source codes, where older copy does not have error, but newer one does. The problem was in NAME OF ADDED IMAGE in '...Droid\Resources\drawable\' - it contained '-' (minus) in name, 'btn-refresh.png'. I have renamed it to 'btnrefresh.png' - and all ok. Many hours spent !#^"%;!"?; !

    Thanks a lot! You are my hero today !

    Monday, April 24, 2017 7:17 AM
  • User305194 posted

    @IvanR said: The problem here may be various things. So you should always try first with setting output verbosity to diagnostic (Tools -> Options -> Projects and solutions -> Build and run) and inspecting the output. It will tell you if you're having resource with '-' or missing some resource or anything else.

    very good point thx very much! in my case it was because of:

    1> obj\Debug\android\manifest\AndroidManifest.xml(14): error APT0000: No resource found that matches the given name (at 'label' with value '@string/app_name'). (TaskId:234) 1> obj\Debug\android\manifest\AndroidManifest.xml(14): error APT0000: No resource found that matches the given name (at 'theme' with value '@style/MyTheme'). (TaskId:234)

    Monday, April 24, 2017 9:26 PM
  • User258468 posted

    I ran into this problem. Using a hex value for a layout text color and forgetting the # in the string produced the error.

    Tuesday, April 25, 2017 6:09 AM
  • User217165 posted

    in AndroidManifest.xml make sure that no names depending on other resources which no longer exist for Ex: android:label="@string/app_name" so we have to go to our resources/string.xml

    1833294650235727

    Tuesday, April 25, 2017 11:49 AM
  • User123793 posted

    This for me was caused by inadvertently adding the line :

    android:layout_height="0"

    instead of

    android:layout_height="0dp"

    Tuesday, April 25, 2017 1:00 PM
  • User12817 posted

    I have filed an issue on this a couple weeks ago. Please look into the description for details:

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

    It seems like this is potentially fixed in a current Alpha version.

    Tuesday, April 25, 2017 3:56 PM
  • User318427 posted

    My reason is the Version Code, it must be a number like "1", but I set it "1.0". It's worked for me.

    Thursday, April 27, 2017 7:18 AM
  • User275516 posted

    @TrucNguyen said: I just resolved this issue. it works for me

    @TrucNguyen said: I just resolved this issue. it works for me

    Thank you.

    Saturday, April 29, 2017 8:51 AM
  • User122934 posted

    My issue ended up being what I entered into either (not sure which one) android:versionCode="1.0" or android:versionName="1.0" within the Android project's AndroidManifest.xml file. Changing both values to just 1 and rebuilding fixed the issue.

    Monday, May 1, 2017 4:43 PM
  • User25921 posted

    I was able to solve this issue by using SDK Manager and making sure I have the correct versions. In my case, I chose all the latest. My SDK Tools and SDK Platform-Tools were using V25. However, my build tools were using V23. I've upgraded Build tools to 25 and it worked successfully.

    Monday, May 1, 2017 7:48 PM
  • User69033 posted

    This is due to many reasons. - (Not sure why xamarin still showing this error in case of XML error!!!!) Please check the XML file completely. In My case, it was mistakenly set for android:layout_weight="wrap_content"

    Friday, May 5, 2017 9:34 AM
  • User258468 posted

    @cwphilli said: I ran into this problem. Using a hex value for a layout text color and forgetting the # in the string produced the error.

    @Manikandan_S said: This is due to many reasons. - (Not sure why xamarin still showing this error in case of XML error!!!!) Please check the XML file completely. In My case, it was mistakenly set for android:layout_weight="wrap_content"

    I ran into this again last night, android:margin instead of android:layout_margin was the culprit.

    Friday, May 5, 2017 4:05 PM
  • User278701 posted

    I spent a lot of time to identify that issue. Finally I become able to resolve it by running the following options

    Project -> Run Code Analysis On On Solution

    After that, I found that an extra resource has been automatically added in the Resource.Designer.cs file, I simply remove that line and everything works like a magic. :)

    Xamarin should improve IDE to identify that issue during compile time, instead of giving that error while deploying the build on the device/emulator.

    Monday, May 8, 2017 10:40 AM
  • User232562 posted

    Check the output window and you will view the xml file that's generating the error.

    Monday, May 8, 2017 7:23 PM
  • User275516 posted

    I again ran into this problem but finally I realized from these discussion that there is small typo bug. Mine error was

    p1:checkablebehavior="single"

    only I changed "b" to "B" what a bug.

    p1:checkableBehavior="single"

    no its running good.

    Tuesday, May 9, 2017 2:33 PM
  • User322320 posted

    @Tarek.Ahmed said: Check the output window and you will view the xml file that's generating the error.

    This work for me.

    "Check the output"

    Tuesday, May 9, 2017 9:44 PM
  • User167324 posted

    @wojt said: Hi, Create folder 'packagedresources' in [project folder or startup project]\obj\Debug\android\bin\ packagedresources :) Works for me.

    Wednesday, May 10, 2017 6:44 AM
  • User223656 posted

    Due to a jPG file i was facing this issue.

    Wednesday, May 10, 2017 12:25 PM
  • User79767 posted

    The error shows for me when my styles.xaml colors.xml or some other XML files had issues. It couldn't fully generate the build and thus was failing. Looking at the the Output window for errors may help.

    Thanks

    Thursday, May 11, 2017 3:35 AM
  • User167324 posted

    I think it happens when dragging file to Vs from explorer , including hiden files seems to work.

    Friday, May 19, 2017 12:53 PM
  • User282150 posted

    Hi, 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.

    Tuesday, May 30, 2017 12:50 PM
  • User12817 posted

    @AmeySawant

    You never want to modify this file directly. It is generated by tooling and manual modification can mess up your project.

    Tuesday, May 30, 2017 3:51 PM
  • User327290 posted

    I have tried above. But it is not working well.

    Tuesday, May 30, 2017 5:14 PM
  • User244003 posted

    Hii everyone,

    The below link may useful for you

    https://stackoverflow.com/questions/43294345/visual-studio-2017-xamarin-the-file-obj-debug-android-bin-packaged-resource

    Tuesday, May 30, 2017 5:47 PM
  • User57571 posted

    In my case was an asset name with "-", hope this helps to someone.

    Friday, June 16, 2017 8:48 PM
  • User311778 posted

    check if you have some file with "-" like "icon-test.png"

    Tuesday, June 20, 2017 12:49 PM
  • User311778 posted

    @MichaelShelestov thanks for your help.

    I renamed the file "icone-test.png" to "icone_test.png"

    Tuesday, June 20, 2017 1:00 PM
  • User261245 posted

    If someone still getting this error, i did everything you guys said in the post and nothing works. Clean and rebuild always work but compile to device (or simulator) just doesn't work.

    I solved this error running the same project on VS2015 (I usually work in XS), and the error list show an error diferente that Xamarin Studio, "Error processing PNG file". I just remembered that the newest image that i added to the project was firstly a JPEG, and i converted to PNG with the mac previewer tool and added to the project (Droid>Resources>Drawable for Android and iOS>Resources for iOS) i hadn't errors on iOS but Android was so annoying. I just deleted this file and compile to device like a charm, then i just convert the jpeg image to PNG with photoshop and everything works.

    Hope this helps.

    Tuesday, June 27, 2017 12:12 AM
  • User303835 posted

    I had an image in drawable named "Time Record". I renamed it as "TimeRecord" removing the space and the problem was solved.

    Monday, July 24, 2017 11:43 AM
  • User286075 posted

    In my case, I was have a resource with an "-" in its name. removing this symbol solves the issue for me.

    Monday, July 24, 2017 6:22 PM
  • User201467 posted

    @AmodAmatya said: I had an image in drawable named "Time Record". I renamed it as "TimeRecord" removing the space and the problem was solved.

    That worked for me , thanks.

    Wednesday, July 26, 2017 5:29 PM
  • User168966 posted

    What worked for me was removing android:name="Some Name" from manifest.

    <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="SomeName.SomeName" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" /> <application android:name="Some Name" android:label="SomeName" android:icon="@drawable/Icon" android:theme="@style/Theme.AppCompat"> </application> </manifest>

    Friday, July 28, 2017 11:56 PM
  • User200738 posted

    I had this error, and the solution was that I had added a "drawable-xhdpi" folder, and within it I had a PNG file named "delete-xhdpi.png". Removing the suffix fixed the problem(renamed to just "delete.png")

    Friday, August 4, 2017 1:17 PM
  • User340687 posted

    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.

    Sunday, August 6, 2017 10:26 AM
  • User75888 posted

    Faced same scenario and realized the following: i realized i was adding a call for some name spaces in the XAML for a removed library.

    Sunday, August 6, 2017 4:55 PM
  • User341826 posted

    i found this error when i add images in the resource folder of Resources/ Drawable / img.jpg img.png etc... just remove it..... hope so it will work

    Wednesday, August 16, 2017 6:50 AM
  • User335627 posted

    Unable to find the preview tools in sdk manager in my Android SDK manager. I am using visual studio 2015. Please help @TrucNgyen @lukasrein97

    Monday, August 21, 2017 6:36 AM
  • User215795 posted

    I've run into the same problem on VS 2015 and VS 2017. My issue was the image file itself. Copied the same image over from a different source and the Android project compiled.

    Tuesday, August 29, 2017 8:33 PM
  • User342985 posted

    hi,

    The problem is that the name of the imported photo contains special characters. It's like in android studio, it does not accept name with spacial characters.

    Thursday, August 31, 2017 8:51 AM
  • User346273 posted

    Hi guys, Im sure many people have the same problem or will get such an error msg sooner or later. Im just happy to tell you the solutions is so simple !!

    you will NOT have to delete/reinstall or do anything of that kind !

    check all your resources :

    1. starting with your images and other files you added to your resource folder, the resource name can only contain characters a to z, 0 to 9 , you cant have a "-" or "{" , ... in your resource file name.
    2. check the activity name ... ( i think a friend explained it before )
    

    and finally check the .net and Xamarin documentation about resources names rules ...

    one very useful step to find out whats going wrong is to get more details from the build process, in order to do so ::smile:
    - In Visual Studio: Tools> Options> Projects and solutions> Build and Run. - In the Dropdown : MSBuild project build output verbosity:> Diagnostic.

    I spent near 6 hours on this problem, I hope sharing this help you pass this kind of problems .

    love you all , and Love Xamarin <3

    Saturday, September 2, 2017 9:46 PM
  • User302044 posted

    You resouce file name can only consist of 1-9, a-b or A-b. No invalid characters.

    Tuesday, September 12, 2017 7:23 PM
  • User204540 posted

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

    This issue is caused by one of the images in drawable folder of your android project, you can resolve this by deleting faulty image in drawable folder.

    Thursday, September 21, 2017 4:57 AM
  • User16951 posted

    Still having this problem on latest stable Xamarin.Android 7.4.5.1 and no build tools v24 installed.

    Diagnostic build level shows no information about which resource name or layout rule is bad. Will keep posted what was the problem when I solve it

    Friday, October 6, 2017 3:57 AM
  • User16951 posted

    With great help from @JonDouglas I was able to locate the problem.

    To do that, we had to open diagnostic build log and find lines like:

    Executing package -f -m -M .. Done executing task "Aapt".

    Then copy everything starting from the word "package" till the end of the line (it should be long). Then locate aapt (mine was here: /Users/username/Library/Developer/Xamarin/android-sdk-macosx/build-tools/26.0.2/aapt and run it with the arguments we just copied and with one additional argument in the end - -v

    /Users/username/Library/Developer/Xamarin/android-sdk-macosx/build-tools/26.0.2/aapt package -f -m -M .... .... .... ... -v

    It revealed exact error and the file it's choking. For example, my output was:

    obj/Debug/res/values/styles.xml:1: note: using v21 attributes; synthesizing resource com.pack.package:style/Theme.App.ActionBar for configuration v21. obj/Debug/res/values/styles.xml:1: note: using v16 attributes; synthesizing resource com.pack.package:style/Theme.App.Button for configuration v16. obj/Debug/res/values/styles.xml:1: note: using v16 attributes; synthesizing resource com.pack.package:style/Theme.App.ChoosePorch for configuration v16. obj/Debug/res/values/styles.xml:1: note: using v16 attributes; synthesizing resource com.pack.package:style/Theme.App.CarTypeDialog for configuration v16. obj/Debug/res/values/styles.xml:1: note: using v16 attributes; synthesizing resource com.pack.package:style/MenuLabelsStyle for configuration v16. [1] 40940 segmentation fault package -f -m -M -J --custom-package com.pack.package -F -S -S -S

    Googling segmentation fault + aapt, turned out there was @+id in styles (should not be there at all) that was the reason for the error.

    Yay. Mystery solved, experience gained and knowledge shared.

    Would be great to have an option for Xamarin.Android to add -v to get detailed output from all Android tools.

    Thank you, Jon!

    Wednesday, October 11, 2017 8:47 PM
  • User347354 posted

    After almost loose my mind, I've changed "MSBuild project build output verbosity" to Detailed in Tools>Option>Project and Solutions>Build and Run, and found the solution: In my case the names of some image files in drawable contains '-', what is not allowed. Hope that helps.

    Friday, October 13, 2017 6:02 PM
  • User359697 posted

    @wojt said: Hi, Create folder 'packagedresources' in [project folder or startup project]\obj\Debug\android\bin\ packagedresources :) Works for me.

    This worked for my at a build stage... but then i get an error that says "permissions denied" for that folder.... any ideas?

    I do not have any "-" dashes on any resource file...

    Tuesday, November 21, 2017 7:46 PM
  • User314133 posted

    I have fixed this issue by removing image in drawable folder named , Image@2x.png . Thank you for the hints guys. saves time.

    Friday, January 5, 2018 12:23 PM
  • User364073 posted

    Executing package -f -m -M obj\Debug\android\manifest\AndroidManifest.xml -J C:\Users\Lenovo\AppData\Local\Temp\ofqarqm4.q3u --custom-package com.billakkspesialisten.bsordre -F obj\Debug\android\bin\packagedresources.bk -S obj\Debug\res -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\0\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\2\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\3\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\6\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\8\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\9\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\10\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\11\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\12\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\19\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\22\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\23\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\24\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\25\jl\res" -S "P:\??????\???????\gitAproTest\ebm2i\BLSProj\Droid\obj\Debug\lp\29\jl\res" -I C:\Users\Lenovo\AppData\Local\Android\Sdk\platforms\android-26\android.jar --auto-add-overlay --no-version-vectors --max-res-version 26 (TaskId:471) 3>Done executing task "Aapt". (TaskId:471) 3>Task "Touch" (TaskId:472) 3> Task Parameter:Files=obj\Debug\android\bin\packagedresources (TaskId:472) 3>P:\?????????\Visual Studio 17\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1921,3): error MSB3375: The file "obj\Debug\android\bin\packagedresources" does not exist. 3>Done executing task "Touch" -- FAILED. (TaskId:472) 3>Done building target "CreateBaseApk" in project "Droid.csproj" -- FAILED.: (TargetId:286)

    @AlexS I found what you were talking about, but there is no "aapt" in these lines. I see that then the task "Touch" is running. Maybe this is a mistake?

    Tuesday, January 9, 2018 7:44 AM
  • User343509 posted

    Check Your Android.Resources.drawable Folder and give proper image name

    Ex. icon_Menu is the right name.

    icon-Menu is the wrong name.

    Monday, January 22, 2018 6:10 AM
  • User322233 posted

    @EraldoJunior said: After almost loose my mind, I've changed "MSBuild project build output verbosity" to Detailed in Tools>Option>Project and Solutions>Build and Run, and found the solution: In my case the names of some image files in drawable contains '-', what is not allowed. Hope that helps.

    I did have the same problem, and I did look on Manifest and saw a invalid character. Thank you.

    Friday, January 26, 2018 12:14 PM
  • User366809 posted

    @ArthurMoreira said: You will need to grub down. What is stopping the generation of packaged_resources? In Visual, Tools --> Options --> Build and execute, choose verbosity Diagnostic. In my case, it was a hyphen character in the name of the action property of an Intent filter.

    This helped me. In verbose build output, I saw that my androidmanifest.xml had a receiver tag (<receiver android:name=".MyReceiver "></receiver>) with name attribute that had a space in it. When I corrected it, build succeeded.

    Saturday, March 31, 2018 1:28 PM
  • User388394 posted

    i solved this issue by myself. issue occurs when i duplicated the axml file in layout folder (i had backup since i have big revision on axml file). after several changes on axml file, i try to rebuild and the error shows. find a solution and tried what solution says here but got no luck. i realized that xamarin generate resource file that contains IDs. and i try ko exclude that duplicated axml and try to rebuild and it works. hope this will help others.

    NOTE: make sure "android:id" value in the whole project are all unique.

    Sunday, August 18, 2019 7:06 AM