过去一天,当我尝试在visual studio 2013中构建我的Xamarin.Forms应用程序时,我一直在努力解决这个错误。我得到的错误是:
"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"
在我提到的路径中的内容目录中,没有“。\ res \”。
这样的东西我将不胜感激任何帮助。以下是详细模式下的输出:
"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)"
答案 0 :(得分:2)
从Visual Studio转到“工具 - > Android-> Android SDK管理器”。打开后,查看“Android支持库”的“Extra”文件夹。确保已经检查过,如果有,请确保您拥有最新的。必要时更新。还要确保在Android项目中安装了最新的Support v7 AppCompat Nuget软件包。
答案 1 :(得分:0)
打开SDK Manager并确保卸载任何预览版本的构建工具。特别是构建工具24 rc