简体   繁体   English

在Eclipse中创建android项目时出错

[英]Error when creating android project on eclipse

I have been struggling with eclipse for about a month now .I deleted eclipse software even booted my pc thinking it have have confilicts with my other software.Even my teacher couldnt help me to fix this. 我已经在eclipse上苦苦挣扎了一个月左右。我删除了eclipse软件,甚至在启动PC时就认为它与我的其他软件有冲突。甚至我的老师也无法帮助我解决此问题。 Every time i try to create an android projects i get a lot of error from the start .Appcompact shows up with error .I found here people giving advices i did all of that but nothing has worked for me . 每次我尝试创建一个android项目时,都会从一开始就遇到很多错误。Appcompact会显示错误。我在这里发现有人在提供建议,但我没有做过所有事情。

On console : 在控制台上:

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'.

when i check the error section it shows : 当我检查错误部分时,它显示:

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

Please any one can help me fix this problem , i couldnt advance on my projects because of it.I would really apreciate your help. 请任何人可以帮助我解决此问题,由于这个原因我无法推进我的项目。我真的很感谢您的帮助。

You should open the project.properties file from android-support-v7-appcompat and change the target api level to target=android-21. 您应该从android-support-v7-appcompat打开project.properties文件,并将目标api级别更改为target = android-21。

Don't forget to clean the workspace after that using Project --> Clean... 之后不要忘记使用Project-> Clean ...清理工作区。

i do not know so i will just post this.. fyi: i have not specifically experienced this type of error, but more like it.. 我不知道,所以我只张贴这个。.fyi:我没有特别经历过这种类型的错误,但是更喜欢它。

1 : delete the android-support-v4.jar in your project and copy the appcompat_v7 's rather 1 :删除项目中的android-support-v4.jar ,然后复制appcompat_v7

2 : Delete the all the files in the bin folder of the appcompat_v7 and clean and build and restart (if this doesn't work at the 1st instance, disable build automatically-[by clicking the project on your eclipse], and redo the no2 and save and restart eclipse, and build save, and restart..) 2 :删除appcompat_v7的bin文件夹中的所有文件,然后清理并构建并重新启动(如果在第一个实例中不起作用,请自动禁用构建-[通过单击Eclipse上的项目],然后重做no2并保存并重新启动eclipse,构建保存并重新启动。)

3 : right click on your appcompat_v7 project goto build path then configure build path then java build path and to the tab order and export and uncheck all the libs there the ones ending with .jar ... if you do not see .jar files then (uncheck android private libraries)(goes with the condition - that's a hard guess because on my project its checked) 3 :右键单击您的appcompat_v7项目goto构建路径,然后配置构建路径,然后是java构建路径,并按Tab键顺序,然后导出并取消选中所有以.jar结尾的库...如果看不到.jar文件,则(取消选中android私有库)(附带条件-这很难猜,因为在我的项目中选中了它)

4 : if you have other libraries then follow number 2(and 3) on them (3 is optional) 4 :如果您还有其他库,请在其上跟随数字2(和3)(3是可选的)

5 : if none of them are working check if there's some update on the adt or anything that can be updated 5 :如果它们都不起作用,请检查adt上是否有任何更新或任何可以更新的内容

Always clean rebuild and restart eclipse okay.. Hope it helps 始终清理重建并重新启动Eclipse。希望对您有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM