Android的 - Eclipse项目决策和R文件错误 [英] Android - Eclipse project making and R file error

查看:144
本文介绍了Android的 - Eclipse项目决策和R文件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在与Eclipse的问题,我在android系统工作。当我创建一个新项目,这个问题会发生,当我点击完成,它自动生成的项目不带R文件和项目创建窗口没有关闭,我不得不将其关闭。我有很多它做工精细(直到现在),当我做一个新项目的问题只来了旧项目。我也得到Styles.xml文件中的错误,指出错误检索父的项目:无资源的发现,给定的名称匹配'Theme.AppCompat.Light'。当我preSS CTRL +单击鼠标右键到R档然后带我到它说找不到源代码的窗口。如果您有这方面的任何解决方案,请张贴在这个问题你的答案。谢谢!
编辑:应用程序兼容性错误,后来解决了。

I'm having issue with Eclipse and I work in android. This issue happens when I create a new project and when I click finish, It auto generates the project without R file and The project creating window doesn't closes and I have to close it. I have many old projects which work fine(Until now) and the issue is only coming when I make a new project. I also get a error in Styles.xml file saying that "Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'". When I press CTRL+RightClick onto R file then it takes me to a window which says "Source Not Found". If you have any solution for this, Please post your answer under this question. Thank you! Appcompat error was solved later.

推荐答案

要解决生成的Java文件丢失R,确保Android SDK工具和Android SDK中内建工具被安装在SDK管理器更新。然后,确保Eclipse更新。在此之后,清理项目和重建家园。

To solve missing R in generated java files, make sure that Android SDK Tools and Android SDK Build-tools are installed and updated in SDK Manager. Then, make sure Eclipse is updated. After this, clean your project and rebuild.

要解决资源没有找到... ...应用程序兼容性,确保Android的支持库安装在SDK管理器更新。然后,应用程序兼容性库可以发现:

To solve No resource found "...AppCompat...", make sure Android Support Library is installed and updated in SDK Manager. Then, the AppCompat library can be found at:

android-sdk/extras/android/support/v7/appcompat

您需要在您的Andr​​oid项目引用此应用程序兼容性库。

You need to reference this AppCompat library in your Android project.

导入库到Eclipse中。要做到这一点:

Import the library into Eclipse. To do so:

右键点击您的Andr​​oid项目。选择属性。点击添加...在底部添加库。选择支持库。最后,清理并重建项目。

Right click on your Android project. Select properties. Click 'add...' at the bottom to add a library. Select the support library. Finally, Clean and rebuild your project.

这篇关于Android的 - Eclipse项目决策和R文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆