简体   繁体   English

创建Android应用程序时Eclipse ADT发生错误

[英]Error on Eclipse ADT while creating an Android Application

I've already tried everything I saw in the forum but it seems that doesn't work for me. 我已经尝试了在论坛上看到的所有内容,但似乎对我不起作用。 I really need to finish this project until Nov. 25th but I'm stuck at the creation of the project. 我确实需要在11月25日之前完成该项目,但我仍然坚持创建该项目。

Eclipse is full of errors, like this: Eclipse充满了错误,如下所示:

[2014-11-05 20:59:48 - TEXApp] [2014-11-05 20:59:48-TEXApp]
D:\\workspace\\appcompat_v7\\res\\values-v21\\themes_base.xml:190: d:\\工作空间\\ appcompat_v7 \\ RES \\值-V21 \\ themes_base.xml:190:
error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. 错误:错误:找不到与给定名称匹配的资源:attr'android:colorPrimary'。

[2014-11-05 20:59:48 - TEXApp] [2014-11-05 20:59:48-TEXApp]
D:\\workspace\\appcompat_v7\\res\\values-v21\\themes_base.xml:191: d:\\工作空间\\ appcompat_v7 \\ RES \\值-V21 \\ themes_base.xml:191:
error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. 错误:错误:找不到与给定名称匹配的资源:attr'android:colorPrimaryDark'。

There's a lot of them, I don't know what's wrong since I installed all the libraries. 它们很多,因为安装了所有库,所以我不知道出了什么问题。

Here's how I set up the project: 这是我设置项目的方式:

http://i.imgur.com/Ps6JtBU.png http://i.imgur.com/Ps6JtBU.png

And this is what I get: 这就是我得到的:

http://i.imgur.com/XhMSWo1.png http://i.imgur.com/XhMSWo1.png

Some times I delete the components which have errors, but I still get the themes_base.xml errors and my R.java is not generated. 有时我删除有错误的组件,但仍然出现themes_base.xml错误,并且未生成我的R.java。

Sorry for the long text but, I don't know what to do, hope you can help me, thanks! 抱歉,冗长的文字,但是,我不知道该怎么办,希望您能为我提供帮助,谢谢!

if your application has the reference of the library appcompat_v7 , Delete the android-support-v4.jar library of your project under /libs folder, that is already defined into the appcompat_v7 library. 如果您的应用程序具有库appcompat_v7的引用,则删除项目/libs android-support-v4.jar下的android-support-v4.jar库,该/libs已在appcompat_v7库中定义。

Having two android-support-v4.jar libraries defined into the same project are causing that problem. 在同一个项目中定义两个android-support-v4.jar库会导致该问题。

Install the last version of the SDK, the problem was solved. 安装最新版本的SDK,问题已解决。

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

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