1

I've been struggling with this error for the past day when I try to build my Xamarin.Forms application in visual studio 2013. The error I get is:

"Error 57 resource directory 'D:\FormsGallery\packages\Xamarin.Android.Support.v7.AppCompat.21.0.3.0\lib\MonoAndroid403\21.0.3\content\.\res' does not exist D:\FormsGallery\FormsGallery\FormsGallery.Android\AAPT FormsGallery.Android" 

In my content directory in the mentioned path there is no such a thing as ".\res\".

I would appreciate any help on this. And below is my output in verbosity mode:

"C:\Program Files (x86)\Android\android-sdk\build-tools\android-4.4W\aapt.exe package -f -m -M C:\Users\Moji\AppData\Local\Temp\r3avdjv1.amc\AndroidManifest.xml -J C:\Users\Moji\AppData\Local\Temp\r3avdjv1.amc --custom-package formsgallery.android -F C:\Users\Moji\AppData\Local\Temp\r3avdjv1.amc\resources.apk.bk -S obj\Debug\res -S D:\FormsGallery\FormsGallery\FormsGallery.Android\obj\Debug\__library_projects__\Xamarin.Forms.Maps.Android\library_project_imports\res -S D:\FormsGallery\FormsGallery\FormsGallery.Android\obj\Debug\__library_projects__\Xamarin.Forms.Platform.Android\library_project_imports\res -S D:\FormsGallery\FormsGallery\FormsGallery.Android\obj\Debug\__library_projects__\Xamarin.Forms.Platform\library_project_imports\res -S D:\FormsGallery\packages\Xamarin.GooglePlayServices.22.0.0.2\lib\MonoAndroid41\22.0.0\content\./res -S D:\FormsGallery\packages\Xamarin.Android.Support.v4.21.0.3.0\lib\MonoAndroid10\21.0.3\content\./res -S D:\FormsGallery\packages\Xamarin.Android.Support.v7.AppCompat.21.0.3.0\lib\MonoAndroid403\21.0.3\content\./res -S D:\FormsGallery\packages\Xamarin.Android.Support.v7.MediaRouter.21.0.3.0\lib\MonoAndroid403\21.0.3\content\./res -j obj\Debug\__library_projects__\1_formsviewgroup.jar -I "C:\Program Files (x86)\Android\android-sdk\platforms\android-18\android.jar" --auto-add-overlay (TaskId:163) AAPT : error : resource directory 'D:\FormsGallery\packages\Xamarin.Android.Support.v7.AppCompat.21.0.3.0\lib\MonoAndroid403\21.0.3\content\.\res' does not exist. The command exited with code 1. (TaskId:163). Done executing task "Aapt" -- FAILED. (TaskId:163)" 

2 Answers 2

2

From Visual Studio go to "Tools->Android->Android SDK Manager". Once that opens, look in the "Extra's" folder for "Android Support Library". Make sure you have that checked, and if you do, make sure you have the latest. Update if necessary. Also make sure you have the latest Support v7 AppCompat Nuget package installed in your Android Project.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks I checked them all and everything is set up correctly. I actually found the workaround. I just created "res" folders in the mentioned paths!
0

Open your SDK Manager and make sure to uninstall any build-tools that is a preview version. Especially the build tools 24 rc

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.