我已经在 Eclipse 上苦苦挣扎了大约一个月。我删除了 Eclipse 软件,甚至启动了我的电脑,认为它与我的其他软件有冲突。甚至我的老师也无法帮助我解决这个问题。每次我尝试创建一个 android 项目时,我从一开始就会遇到很多错误。Appcompact 显示错误。我发现这里有人提供建议,我做了所有这些,但没有任何效果对我有用。
在控制台上:
C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
当我检查错误部分时,它显示:
Description Resource Path Location Type
error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. styles_base.xml /appcompat_v7/res/values-v21 line 75 Android AAPT Problem
Description Resource Path Location Type
The container 'Android Dependencies' references non existing library 'C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\bin\appcompat_v7.jar' Testapp Build path Build Path Problem
Description Resource Path Location Type
The project cannot be built until build path errors are resolved Testapp Unknown Java Problem
请任何人都可以帮助我解决这个问题,因此我无法推进我的项目。我非常感谢您的帮助。
最佳答案
我不知道,所以我只会发布这个..仅供引用:我没有具体经历过这种类型的错误,但更像是这样..
1 :删除项目中的 android-support-v4.jar
并复制 appcompat_v7
2 :删除 appcompat_v7
的 bin 文件夹中的所有文件并清理并构建并重新启动(如果这在第一次不起作用,请禁用自动构建-[通过单击 Eclipse 上的项目],然后重做 no2 并保存并重新启动 Eclipse,然后构建保存并重新启动..)
3 :右键单击您的 appcompat_v7
项目,转到构建路径,然后配置构建路径
然后java构建路径和选项卡顺序和导出并取消选中所有以.jar结尾的库...如果您没有看到.jar文件,那么(取消选中android私有(private)库)(符合条件 - 这是一个困难猜测是因为在我的项目中它被检查了)
4:如果您有其他库,请按照编号 2(和 3)进行操作(3 是可选的)
5:如果它们都不起作用,请检查广告是否有更新或任何可以更新的内容
始终清理重建并重新启动 Eclipse 好吧。希望它有帮助
关于java - 在eclipse上创建android项目时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27724983/