简体   繁体   English

在Eclipse ADT中创建android项目后,出现大量错误

[英]After creating android project in Eclipse ADT, tons of errors show up

I'm using eclipse ADT (most recent version) to develop some android apps. 我正在使用eclipse ADT(最新版本)来开发一些android应用。 I've followed the getting started tutorial at the dev.android.com and it worked just fine. 我遵循了dev.android.com上的入门教程,效果很好。

But when i tried to create another project with the same targets and sdk's, i've got nothing but errors: 但是,当我尝试创建具有相同目标和SDK的另一个项目时,除了错误我什么也没有:

Some errors and my sdk's: 一些错误和我的SDK:

在此处输入图片说明在此处输入图片说明

That's the same sdk's i used before these errors started showing up. 这些错误开始出现之前,我使用的是sdk。 What can be causing this? 是什么原因造成的?

EDIT: my project won't generate the R.java file 编辑:我的项目不会生成R.java文件

You might need to add a support library to your new project. 您可能需要在新项目中添加支持库。

Check this link for downloading the support libraries - 检查此链接以下载支持库-

http://developer.android.com/tools/support-library/setup.html#download http://developer.android.com/tools/support-library/setup.html#download

Please notice that you need to import them into your eclipse and then include one (preferably the newest, not sure about this) in your project. 请注意,您需要将它们导入到eclipse中,然后在项目中包括一个(最好是最新的,对此不确定)。

EDIT: Before downloading the support libraries you should first check if you have them already. 编辑:在下载支持库之前,您应该首先检查是否已经拥有它们。 Try this, right click project folder in the eclipse package explorer, Properties>Android>Library>Add> select a library if you have one . 尝试此操作,右键单击eclipse软件包浏览器中的项目文件夹,然后依次单击属性> Android>库>添加> 选择一个库 There might be an invalid library included in your project already, if that happens then you will see it in the Library>Add> menu, remove it and add a new one. 您的项目中可能已经包含一个无效的库,如果发生这种情况,您将在Library> Add>菜单中看到它,将其删除并添加一个新的库。

You might have clean your project ........ if yes. 您可能已经清理了项目..... 如果是。 ....you must check whether R.java file is present in **Project(your project)->gen->package name->R.java** ....您必须检查** Project(您的项目)-> gen->程序包名称-> R.java **中是否存在R.java文件。

if not than u have to update Tool Folder in SDK manager 如果不是 ,则必须在SDK管理器中 更新工具文件夹

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

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