[英]Adding assets to Android Project, Visual Studio 2015 CTP
我正在嘗試使用Visual Studio 2015 CTP將資產添加到android項目中。 當我將文件添加到ProjectName.Packaging / res時,構建失敗並顯示以下錯誤:
1> -package-resources:
1> [aapt] Found Deleted Target File
1> [aapt] Creating full resource package...
1> [aapt] invalid resource directory name: C:\ProjectName\ARM\Release\Package\res image.png
1>
1> BUILD FAILED
1> C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:932: The following error occurred while executing this line:
1> C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:950: null returned: 1
1>
1> Total time: 0 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\AndroidPackaging\Android.Common.targets(280,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3\\bin\ant.bat" debug -Dout.final.file="C:\ProjectName\ARM\Release\ProjectName.Packaging.apk"" exited with code 1.
請指教。 謝謝。
好的,我能夠回答我的問題。 右鍵單擊ProjectName.Packages-> Add-> New Folder並將其命名為資產。 右鍵單擊資產->添加->現有項目->選擇要添加的資產。
如果錯誤仍然存在,請清除項目,然后從C:\\ ProjectName \\ ARM \\ Release或其他手動刪除構建文件夾。 重建。
資源的文件名不能包含空格,請使用_代替
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.