无法运行引进项目 [英] Unable to run imported project

查看:131
本文介绍了无法运行引进项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个项目分别为previously测试,在一台计算机来工作。

因为我已经迁移到另一台Windows XP电脑,我设置这个XP系统的开发工具。我已经下载并安装,以以下:
1.经典的Eclipse 3.6.1
2. JDK V6(JDK-6u23-窗口-i586.exe)
3. Android的SDK工具rev8(installer_r08-windows.exe后)
4. SDK平台V2.3 / 2.2,谷歌的API,Android的API8,转2,谷歌的USB驱动程序,rev4
5. ADT 8.0.1

我创建了一个新的空项目只是为了确保一切运转正常,我似乎能够得到新的项目,在模拟器上就好运行。然而,当我导入现有的项目到工作区中,我得到了一堆错误,如: 进口java.util中不能得到解决 进口的Andr​​oid解决不了的

当我在看项目属性 - > Java构建路径,显示无法获取该项目的系统库下的库和排序和导出。怎么了?

我也试着复制并粘贴从导入项目.java文件和main.xml中的文件到新的项目,它可以正常运行......但不知何故导入的项目没有。

感谢。

解决方案
  1. 右键点击项目名称,打开属性。
  2. 选择Java构建路径(左菜单)
  3. 在库选项卡,找到进入无法获取项目的系统库',选中然后点击删除按钮。
  4. 选择的Andr​​oid(左菜单),勾选android上你想要的目标版本。
  5. 选择项目菜单(主顶级菜单),选择Clean ...选择确定。
  6. 右键再次点击项目名称,再往安卓工具>修复项目属性。

这是应该做的伎俩,并添加Android的XX(版本选择)到项目,以及引进项目应开始工作。

享受。

I have a few projects that were previously tested to be working in 1 PC.

I've since moved to another Windows XP PC, and I've setup the development tools on this XP system. I've downloaded and installed the following in order:
1. Eclipse Classic 3.6.1
2. JDK v6(jdk-6u23-windows-i586.exe)
3. Android SDK Tools rev8(installer_r08-windows.exe)
4. SDK Platform v2.3/2.2, Google APIs, Android API8, rev2, Google USB driver, rev4
5. ADT 8.0.1

I created a new empty project just to make sure things are working, and I seem to be able to get that new project to run on the emulator just fine. However, when I imported an existing project into the workspace, I get a bunch of errors, such as: "The import java.util cannot be resolved" "The import android cannot be resolved"

When I look at Project Properties->Java Build Path, it shows "Unable to get system library for the project" under "Libraries" and "Order and Export". What's wrong?

I've also tried copying and pasting the .java files and main.xml files from the imported project to the new project, and it runs correctly...but somehow the imported project doesn't.

Thanks.

解决方案

  1. Right click on project name, open properties.
  2. Select Java Build Path (from left menus)
  3. Under the "Libraries" tab, find the entry 'Unable to get system library for project', select it then click on the Remove button.
  4. Select Android (from left menus), tick on the version of android you want to target.
  5. Select Project menu (main top level menu), select Clean... Select OK.
  6. Right click on project name again, go down to Android Tools > Fix Project Properties.

That should do the trick and add Android X.X (version you selected) to your project, and the imported project should start working.

Enjoy.

这篇关于无法运行引进项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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