安装Android的Eclipse插件ADT遇到错误“requires 'org.eclipse.gef 0.0.0' but it could not be found”

来源:互联网 发布:全民家庭记账软件 编辑:程序博客网 时间:2024/05/17 21:52

首先是安装Eclipse,方法有两种:
第一种是通过Ubuntu自带的程序安装功能安装Eclipse,应用程序->Ubtuntu软件中心,搜Eclipse安装即可。
第二种方法是用命令:应用程序->附件->终端
然后输入(中间可能需要你输入密码):
sudo apt-get install eclipse
sudo apt-get install eclipse-pde
sudo apt-get install eclipse-jdt

使用第一种安装:

Ubuntu10自带的是Eclipse3.5.2,安装一切正常。

Eclipse的版本是3.5.2,配置Android的开发环境时遇到问题……

按照Android官方文档一步步安装,到了安装Eclipse的ADT插件时,提示“requires 'org.eclipse.gef 0.0.0' but it could not be found”,找了很久终于解决问题:

缺少GEF,Eclipse's Graphic Editing Framework,下面是这个插件的地址:

http://download.eclipse.org/tools/gef/updates/releases/

在Eclipse的菜单栏Help->Install New Software中添加这一项,然后选择对应Eclipse版本的选项安装好即可。

原文地址在此(感谢这位哥们儿,贡献一个链接)

http://tewson.com/content/orgeclipsegef-000-required-installing-android-development-tools-eclipse-351

另外在安装ADT时还需要添加以下站点以便自动安装依赖的组件:

Eclipse GEF      - http://download.eclipse.org/tools/gef/updates/releases/
Eclipse EMF      - http://download.eclipse.org/modeling/emf/updates/releases/
Eclipse GMF      - http://download.eclipse.org/modeling/gmf/updates/releases
Eclipse Webtools - http://download.eclipse.org/webtools/updates/
Google eclipse Plugin - http://dl.google.com/eclipse/plugin/3.5

--------------------------------------------------------

可安装好上面GEF时,仍然报错,报错could not be found

ADT 地址

http://dl-ssl.google.com/Android/eclipse/

--------------------------------------------------------

如果此时还出现错误:

An error occurred while installing the items
session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Install, operand=null --> [R]org.eclipse.ant.ui 3.4.1.v20090901_r351, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
The artifact file for osgi.bundle,org.eclipse.ant.ui,3.4.1.v20090901_r351 was not found.
则说明eclipse-pde或是eclipse-jdt没安装上。其说明的网址如下:https://bugs.launchpad.net /ubuntu/+source/eclipse/+bug/477944(全英文的)所以,如果使用第一种方法的,最好,再在终端输入命令:
sudo apt-get install eclipse-pde
sudo apt-get install eclipse-jdt

当这个安装好后,再进行ADT插件安装就不会出错了。

 

另外,进行Android JNI 开发,需要对c++/c 进行编译,所以我们最好安装一个图IDE,还好eclipe 有支持c/c++ 的插件CDT

方法如下:

1、启动eclipse,
2、选择Help->Install New Software...,在Work with的框框下复制下面的地址: http://download.eclipse.org/releases/galileo
3、选择Collaboration->Mylyn Bridge: C/C++ Development,安装,重启eclipse。
4、同上述2、3,选择Programming Languages->Eclipse C/C++ Development,都选上吧,现在硬盘不贵的。重启eclipse,试试吧,有tutorial的。
注意:
在安装Mylyn Bridge: C/C++ Development,如果直接选择安装Eclipse C/C++ Development,会出现如下错误:
Cannot complete the install because one or more required items could not be found.
Software being installed: Mylyn Bridge: C/C++ Development 5.1.0.200909110608 (org.eclipse.cdt.mylyn.feature.group 5.1.0.200909110608)

Missing requirement: Mylyn Bridge: C/C++ Development 5.1.0.200909110608 (org.eclipse.cdt.mylyn.feature.group 5.1.0.200909110608) requires 'org.eclipse.mylyn.context.core 3.0.0' but it could not be found

注意: 记得安装C++必要工具,安装的是GCC工具链,Make等一系列开发工具,命令如下:

sudo apt-get install build-essential

要不然#include头文件的时候,会出现提示:Unresolved inclusion:<iostream>

好了,Ubuntu下面,安装Eclipse,同时装CDT插件,和ADT插件完美解决了

原创粉丝点击