eclipse 尝试在eclipse中使用phonegap创建android应用程序时出现“无效的资源目录名称”错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3197547/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error "Invalid resource directory name" when trying to create android app with phonegap in eclipse
提问by a.stringham
I followed the tutorial herebut when I create the project in Eclipse, i get an error "invalid resource directory name. Resource: "drawable-hdpi" path "/HelloAndroid/res" type "Android AAPT Problem"
我遵循了此处的教程,但是当我在 Eclipse 中创建项目时,出现错误“资源目录名称无效。资源:“drawable-hdpi”路径“/HelloAndroid/res”类型“Android AAPT 问题”
采纳答案by nickfox
I believe you have the wrong platform set. Right click on the Project name in Eclipse and go to properties and then click on Android and select at least Android 1.6.
我相信你的平台设置错误。在 Eclipse 中右键单击项目名称并转到属性,然后单击 Android 并选择至少 Android 1.6。
回答by Spadar Shut
I had the same issue. It turned out that I copied xml filesfrom phonegap's xml
folder to the project's res
folder, not the whole xml
folder.
我遇到过同样的问题。原来是我把 xml文件从 phonegap 的xml
文件夹复制到了项目的res
文件夹,而不是整个xml
文件夹。
So in the project's folder structure should go like this:
所以在项目的文件夹结构中应该是这样的:
res/xml/phonegap.xml
res/xml/plugins.xml
回答by Srinath Ganesh
had the issue when I forgot to add xml file inside the xml folder
当我忘记在 xml 文件夹中添加 xml 文件时出现问题