简体   繁体   English

在Eclipse中为Android App创建新项目时出现很多错误

[英]A lot of error when create new project in eclipse for Android App

I installed eclipse and SDK correctly but when I create new project , I get a lot of error. 我正确安装了eclipse和SDK,但是当我创建新项目时 ,出现很多错误。
my R.java file is lost, while there are not file in res that have upper case character 我的R.java文件丢失,而res中没有大写字符的文件
I deleted folders that have error in res folder but created new error 我删除了res文件夹中有错误的文件夹,但创建了新错误
Please help me. 请帮我。 在此处输入图片说明

this picture is my SDK manage if there are a component trhat must be install please say 这张图片是我的SDK管理的,如果必须安装一个组件,请说
Note : Android SDK Tools 22.6 is installed 注意: 已安装Android SDK Tools 22.6 在此处输入图片说明

It is an error for missing android-support-v7-appcompat.jar file in your libs folder. 如果您的libs文件夹中缺少android-support-v7-appcompat.jar文件,这是一个错误。 I suggest you to add it from your sdk folder's following location 我建议您从sdk文件夹的以下位置添加它

sdk\extras\android\support\v7\appcompat\libs\android-support-v7-appcompat.jar

Please Refer this step: 请参考以下步骤:

  1. From Eclipse (with ADT), select Window > Android SDK Manager. 在Eclipse(带有ADT)中,选择“窗口”>“ Android SDK Manager”。
  2. From Android Studio, select Tools > Android > SDK Manager. 在Android Studio中,选择工具> Android> SDK Manager。
  3. Start the Android SDK Manager. 启动Android SDK Manager。
  4. In the SDK Manager window, scroll to the end of the Packages list, find the Extras 在“ SDK管理器”窗口中,滚动到“包”列表的末尾,找到“其他”
    folder and, if necessary, expand to show its contents. 文件夹,并在必要时展开以显示其内容。
  5. Select the Android Support Library item. 选择“ Android支持库”项。

Note: If you're developing with Android Studio, select and install the Android Support 注意:如果您使用的是Android Studio,请选择并安装Android支持
Repository item instead. 仓库项目代替。

  1. Click the Install packages... button. 单击安装软件包...按钮。

Check it this process... 检查这个过程...

actually solving this problem is easy: first you need to find android-support-v7-appcompat.jar and android-support-v4.jar in this folder : 解决这个问题其实很容易:首先,您需要在以下文件夹中找到android-support-v7-appcompat.jar和android-support-v4.jar:

sdk\\extras\\android\\support\\v7\\appcompat\\libs\\ SDK \\演员\\机器人\\ SUPPORT \\ V7 \\程序兼容性\\库\\

(if you can't find them then you should install them from Android SDK Manager: Extras/Android Support Library) (如果找不到它们,则应从Android SDK Manager中安装它们:Extras / Android支持库)

and copy them into libs folder in your project inside work-space. 并将它们复制到工作空间内项目中的libs文件夹中。

for example: 例如:

\\androidWorkspace\\projectName\\libs \\ androidWorkspace \\项目名称\\库

and also make sure in eclipse 并确保日食

project/properties/Java Build Path 项目/属性/ Java构建路径

that first two files are connected with those copied files. 前两个文件与那些复制的文件连接在一起。

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

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