解决Activator X for bundle Y is invalid 以及 Activator not found

简介: 如果没有发现编译期异常(就是导航栏项目上有红叉,红感叹号),那么Activator X for bundle Y is invalid和Activator not found这两个异常通常发生在eclipse3.6以及更老的RCP版本中。

如果没有发现编译期异常(就是导航栏项目上有红叉,红感叹号),那么Activator X for bundle Y is invalid和Activator not found这两个异常通常发生在eclipse3.6以及更老的RCP版本中。

未找到的原因是插件工程的build.properties文件下的bin.includes属性未包含“.”位置。

 

我们知道,build.properties文件是构建配置,它的属性最后会被添加到classpath中,如果没有添加".",则不会从“当前位置”查找类。
于是,要么类无法找到,要么equinox认为该bundle没有该Activator的访问权限,于是报出了之前的异常。
解决方案如下:
 
 
 
打开MANIFEST.MF编辑器,在Runtime签页的ClassPath位置,点击New,然后输入".",保存。
如果,ClassPath已经有了内容,把"."移动到最上方。
 
为什么eclipse3.7之后就没有这个问题了呢?
不是因为eclipse不再需要"."位置了,而是该编辑器自动为你添加了这个位置。
 
 
如果有编译期异常呢?
你发现很多项目都有莫名的红叉或者红色感叹号,怎么处理?
这种问题会发生在任何版本的eclipse中,它并不是BUG,而是你有某个常用的插件的ClassPath出错了。
首先关注红色感叹号的插件,它们的问题最严重,解决方式很简单:
1、打开MANIFEST.MF编辑器,检查Dependency和Runtime->Classpath。
2、项目上右键->build path->Configuration build path,检查Libraries内容。
检查不出来请复习Java基础知识。
 
如果这样还没有解决问题。那么问题大了,你需要排查插件。
1、随便找到一个插件,检查打开MANIFEST.MF编辑器,检查Dependencies签页内容。
2、看看哪些红叉插件是较为通用,就是依赖层级更高,双击它,继续检查它的Dependencies
3、如果有红叉存在,递归1操作,如果没有,解决本插件的问题。
 
 
 
目录
相关文章
|
6月前
|
iOS开发
解决App Installation failed, No code signature found.
解决App Installation failed, No code signature found.
133 0
|
2月前
|
Android开发
【Bug】Android resource linking failed和error: failed linking references.
【Bug】Android resource linking failed和error: failed linking references.
|
8月前
|
缓存 PHP
Composer 报错 Error while processing content unencoding: Unknown failure within ...
Composer 报错 Error while processing content unencoding: Unknown failure within ...
130 0
|
5月前
|
Docker 容器
解决:Error response from daemon: manifest for xxx:latest not found: manifest unknown.
解决:Error response from daemon: manifest for xxx:latest not found: manifest unknown.
136 0
|
6月前
|
开发者
上传苹果版本时错误解决办法:No suitable application records were found. Verify your bundle identifier
上传苹果版本时错误解决办法:No suitable application records were found. Verify your bundle identifier
60 2
|
9月前
|
Android开发
Failed to obtain GLES 2.x extensions striProcess finished with exit code -1073741819 (0xC0000005)
android studio打开虚拟机时报错信息,解决办法之一(我成功的办法,其他方法试了没用), 打开 设备管理器然后找到你的独显,然后禁用设备,然后再次启动设备就行了,最后再启动你的虚拟机就行了。
84 0
|
10月前
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1179)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1179)
178 0
|
11月前
|
开发者 iOS开发
Xcode运行报错The operation couldn’t be completed. Unable to launch xxx because it has an invalid code...
Xcode运行报错The operation couldn’t be completed. Unable to launch xxx because it has an invalid code...
639 0
使用 spritesmith 报错 Error: Invalid file signature
使用 spritesmith 报错 Error: Invalid file signature
86 0
使用 spritesmith 报错 Error: Invalid file signature
|
网络协议 关系型数据库 Linux
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
145 0