简体   繁体   English

Android Eclipse无法导入项目

[英]Android Eclipse fail to import project

please help me :( 请帮我 :(

I'm a beginner in this. 我是一个初学者。

I have a 64 bits system with Ubuntu Gnome 13.10. 我有一个使用Ubuntu Gnome 13.10的64位系统。

I wanted to start developing in Android. 我想开始在Android中进行开发。 So I downloaded the Android SDK from here http://developer.android.com/sdk/index.html extract the files and all the process. 因此,我从此处http://developer.android.com/sdk/index.html下载了Android SDK,然后提取文件和所有过程。 Then I did this : " sudo apt-get install openjdk-7-jre openjdk-7-jdk icedtea-7-plugin " 然后我这样做:“ sudo apt-get install openjdk-7-jre openjdk-7-jdk icedtea-7-plugin”

So I opened Eclipse and the message " error while loading shared libraries: libz.so.1 " showed up in the console. 因此,我打开Eclipse,并在控制台中显示消息“加载共享库时出错:libz.so.1”。 I read I had to install some of the 32 bit libraries if I was using a 64 bit system, so put this in terminal: sudo apt-get install ia32-libs. 我读到如果我使用的是64位系统,则必须安装一些32位库,因此请将其放在终端中:sudo apt-get install ia32-libs。 It didn't work but tried with this : sudo apt-get install lib32z1 , sudo apt-get install lib32ncurses5 , sudo apt-get install lib32z1. 它没有用,但尝试了以下方法:sudo apt-get install lib32z1,sudo apt-get install lib32ncurses5,sudo apt-get install lib32z1。 The first and the third worked. 第一个和第三个有效。

Thought everything was gonna be fine, opened Eclipse and Import a project, by File -> Import ... But all the code showed up with errors. 以为一切都会好起来的,通过File-> Import打开Eclipse并导入一个项目...但是所有代码都出现了错误。 Basically everything says "SomethingSomething cannot be resolved to a type" There are 85 errors like this. 基本上所有内容都说“ SomethingSomething无法解析为一种类型”,有85个这样的错误。

Also, I noticed that my R.java is missing, I tried creating a new project, named it "R.java" and pasting the code and saving it. 另外,我注意到我的R.java丢失了,我尝试创建一个新项目,将其命名为“ R.java”,然后粘贴代码并保存。 Didn't work. 没用

I've tried on Project->Clean. 我试过Project-> Clean。 And Right click, Android Tools, Fix Project Properties. 然后右键单击,Android工具,修复项目属性。 Both did nothing. 两者都没做。 Tried changing API target to the latest, 19, but nothing. 尝试将API目标更改为最新的19个,但是什么也没有。

Read also that it could be the name of the package in the AndroidManifest.xml but everything appears to be fine in there. 另请阅读,它可能是AndroidManifest.xml中的包的名称,但是在那里似乎一切正常。

I also would like to say that I can create new projects. 我也想说我可以创建新项目。 It creates the R.java and it works just fine. 它创建R.java,并且工作正常。 It's just importing. 它只是导入。

Could you please please help me? 你能帮我吗?

Any answer will be appreciated :) 任何答案将不胜感激:)

我正在使用Windows,但是我认为Eclipse是相同的:在Eclipse中,您必须转到“帮助”->“安装新软件”。在此处输入Android-Plugin的方向。

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

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