Android Eclipse导入源码时对自己新增的class文件提示"XXX cannot be resolved to a type"的解决办法
2017-02-27 15:55
761 查看
Eclipse导入源码时对自己新增的class文件提示"XXX cannot be resolved to a type"错误提示,且在Eclipse中点击该class对象时无法跳转到该类,解决办法:
在android/.classpath(拷贝自android/development/ide/eclipse/.classpath)
文件中加入自己新增的文件路径即可。
如自己新增的类文件放入frameworks/base/packages/SystemUI/systemuixxx/src下面的,则在.classpath文件中加入如下代码即可
<classpathentry kind="src" path="frameworks/base/packages/SettingsProvider/src"/>
<classpathentry kind="src" path="frameworks/base/packages/SystemUI/src"/>
<classpathentry kind="src" path="frameworks/base/packages/SystemUI/systemuixxx/src"/>
最后按“F5”刷新一下已导入的工程。
在android/.classpath(拷贝自android/development/ide/eclipse/.classpath)
文件中加入自己新增的文件路径即可。
如自己新增的类文件放入frameworks/base/packages/SystemUI/systemuixxx/src下面的,则在.classpath文件中加入如下代码即可
<classpathentry kind="src" path="frameworks/base/packages/SettingsProvider/src"/>
<classpathentry kind="src" path="frameworks/base/packages/SystemUI/src"/>
<classpathentry kind="src" path="frameworks/base/packages/SystemUI/systemuixxx/src"/>
最后按“F5”刷新一下已导入的工程。
相关文章推荐
- Maven创建Web项目,jsp引入静态文件提示报错(javax.servlet.ServletException cannot be resolved to a type ) 解决办法
- Eclipse Android开发遇到:"The type org.apache.http.HttpResponse cannot be resolved."问题的解决办法
- Android导入的项目再次启动eclipse时提示The import android cannot be resolved的解决办法
- "XXX cannot be resolved to a type "eclipse报错及解决说明
- "XX cannot be resolved to a type "eclipse报错及解决说明
- (转)eclipse报错及解决说明 "XX cannot be resolved to a type "
- "XX cannot be resolved to a type "eclipse报错及解决说明
- Eclipse 中JSP文件出现String cannot be resolved as a type的解决办法
- Android导入项目出现“R cannot be resolved to a variable"错误的解决方法
- "Button cannot be resolved to a type" 解决办法
- XX cannot be resolved to a type "eclipse报错及解决说明
- "XX cannot be resolved to a type "eclipse报错及解决说明
- ClassCastException:android.app.Application cannot be to XXX的解决办法
- &quot;XX cannot be resolved to a type &quot; eclipse报错及解决说明
- rcp(插件开发)The type XXX cannot be resolved. It is indirectly referenced from required .class files解决办法
- 杂(二): "** cannot be resolved to a type "eclipse报错及解决
- "XX cannot be resolved to a type "eclipse报错及解决说明
- "XX cannot be resolved to a type "eclipse报错及解决说明
- Android项目导入出现The type java.lang.Object cannot be resolved.问题解决办法!!
- "XX cannot be resolved to a type "eclipse报错及解决说明