Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/310.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在eclipse上创建android项目时出错_Java_Android_Xml_Eclipse - Fatal编程技术网

Java 在eclipse上创建android项目时出错

Java 在eclipse上创建android项目时出错,java,android,xml,eclipse,Java,Android,Xml,Eclipse,我已经和eclipse斗争了大约一个月了。我删除了eclipse软件,甚至启动了我的电脑,认为它与我的其他软件有冲突。甚至我的老师也不能帮我解决这个问题。每次我尝试创建一个android项目时,我从一开始就犯了很多错误。Appcompact出现了错误。我发现这里有人给我提建议,我做了所有这些,但没有任何效果 在控制台上: C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:193: er

我已经和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
当我检查错误部分时,它会显示:

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

请任何人都能帮我解决这个问题,因为这个问题,我无法推进我的项目。我非常感谢你的帮助。

你应该从
android-support-v7-appcompat
打开
project.properties
文件,并将目标api级别更改为target=android-21


之后,请不要忘记使用Project-->clean清理工作区

我不知道,所以我将发布此。。仅供参考:我没有特别经历过这种类型的错误,但更像是

1:删除项目中的
android-support-v4.jar
,并复制
appcompat\u v7

2:删除
appcompat\u v7
的bin文件夹中的所有文件,并清理、生成和重新启动(如果在第一个实例中不起作用,请自动禁用生成-[通过单击eclipse上的项目],然后重做no2并保存和重新启动eclipse,以及生成、保存和重新启动..)

3:右键单击您的
appcompat\u v7
项目转到生成路径,然后配置生成路径 然后java构建路径和标签顺序,导出并取消选中所有以.jar结尾的lib。。。如果您没有看到.jar文件,那么(取消选中android私有库)(根据条件进行-这很难猜测,因为在我的项目中它已选中)

4:如果您有其他库,请按照数字2(和3)进行操作(3是可选的)

5:如果它们都不工作,请检查adt上是否有更新或任何可以更新的内容


始终清理重建并重新启动eclipse好的。。希望对您有所帮助

您是否在时尚地使用
AppCompat.ActionButton
?你应该提高目标API级别我刚才看到一个人说,如果他把API 14作为一个最小的sdk,他就不会有问题了。我现在正在下载它,希望它能解决我的问题。我的意思是,我甚至没有开始一个项目,我什么都没碰,我默认让一切,除了选择要编译的sdk。我做了所有这些,并且还是不行!仍然不起作用它显示:无法执行dex:多个dex文件定义Landroid/support/annotation/AnimRes;[2014-12-31 20:31:43-Ma]转换为Dalvik格式失败:无法执行dex:多个dex文件定义Landroid/support/annotation/AnimRes;现在,我把API 14作为一个最小的近似,但问题没有显示出来,但现在当我尝试在hello world午餐时,eclipse在应用程序上显示错误,并说C:\Users\mm\Desktop\workspaceandroid\MY\res\values-v14\styles.xml:8:error:error检索项的父项时,没有找到与给定名称“android:AppBaseTheme”匹配的资源。是xml吗文件夹中名为values\u v14的文件?