关于Unable to load annotation processor factory 的故障
2019独角兽企业重金招聘Python工程师标准>>>
导入一个项目的时候,如果提醒以下错误,可参考https://github.com/excilys/androidannotations/wiki/Eclipse-only-configuration进行排错:
Description Resource Path Location Type
Unable to load annotation processor factory 'package-name-xxxxxe--.0.0.jar' for project project-name Annotation processor factory path APT Build Problem
https://github.com/excilys/androidannotations/wiki/Eclipse-only-configuration 的具体步骤:
Eclipse only configuration
- Looking for an example? See this project.
Configuring Eclipse
Please note that there are two important JARs in AndroidAnnotations:
androidannotations-X.X.X-api.jar
is the API JAR, it must be in your build path and will be part of the final APKandroidannotations-X.X.X.jar
is the processor JAR, it is only needed at compile time, and must be in the compiler classpath.
Steps
- Put
androidannotations-X.X.X-api.jar
in thelibs
folder - Put
androidannotations-X.X.X.jar
in a different folder, such ascompile-libs
.androidannotations-X.X.X.jar
must not go in thelibs
folder.(注意,jar包不能放到lib文件夹或其子目录) - Right-click on your project, choose "Properties"
- Go to
Java Compiler
and make sure thatCompiler compliance level
is set to 1.6, otherwise the processor won't be activated - Go to
Java Compiler > Annotation Processing
and chooseEnable annotation processing
- Go to
Java Compiler > Annotation Processing > Factory Path
and add the processor JAR :androidannotations-X.X.X.jar
. - Confirm the workspace rebuild
- Go to
Java Build Path > Libraries
and add the API JAR :androidannotations-X.X.X-api.jar
, unless it's already in the build path (ADT 17 automatically adds JARs that are in the libs folder). - You can start using AndroidAnnotations
Troubleshooting
To check that AndroidAnnotations is activated, you should see AndroidAnnotations logs in the Eclipse Error Log (
Window > Show View > Error Log
) as soon as you save a file. If you do not see any log here, then it means AndroidAnnotations isn't activated yet.If AndroidAnnotations isn't activated, this may be a Java version problem. You should check that
eclipse.ini
doesn't contain-Dosgi.requiredJavaVersion=1.5
, and otherwise change it to-Dosgi.requiredJavaVersion=1.6
.When AndroidAnnotations is activated, You should now see any annotation problem as a regular error marker within the editor and in the Problem view.
Your project name should be identical to the name of the folder containing the project. When importing a project in Eclipse, the project name used is the name of the folder. Since the annotation jar is referenced by
projectName/lib/androidannotations-X.X.X.jar
, you may otherwise encounter errors when coworkers import your project.If you get a
java.lang.IllegalArgumentException: already added: Lorg/androidannotations/annotations/AfterInject;
when compiling, please check that you did not put the processor jarandroidannotations-X.X.X.jar
in thelibs
folder.If you get a
java.lang.NoClassDefFoundError
at runtime, please verify inproject properties > Java Build Path > Order and Export
thatandroidannotations-xxx-api.jar
is checked.
Next step
- Start using AndroidAnnotations
转载于:https://my.oschina.net/reborn87/blog/415716
关于Unable to load annotation processor factory 的故障相关推荐
- unable to load annotation processor
今天在新电脑上启动项目时,发现有个红叉叉,以前貌似没见过,百度之后决定记录一下,报错信息是,unable to load annotation processor XXX,解决方法: 说无法加载ann ...
- java.lang.UnsatisfiedLinkError: Unable to load library ‘D:\dll\DwgOperInterface‘: 找不到指定的模块
执行代码 import com.sun.jna.Library; import com.sun.jna.Native; import com.sun.jna.ptr.IntByReference;pu ...
- 秒懂Android注解处理器(Android Annotation Processor)
[版权申明]非商业目的可自由转载 博文地址:https://blog.csdn.net/ShuSheng0007/article/details/90734159 出自:shusheng007 文章目 ...
- Java编译时注解处理器(Annotation Processor)详解
上篇文章我们使用注解+反射实现了一个仿ButterKnife功能的示例.考虑到反射是在运行时完成的,多少会影响程序性能.因此,ButterKnife本身并非基于注解+反射来实现的,而是用Annotat ...
- Hadoop “Unable to load native-hadoop library for y
2019独角兽企业重金招聘Python工程师标准>>> http://devsolvd.com/questions/hadoop-unable-to-load-native-hado ...
- PHP问题 —— Warning: PHP Startup: Unable to load dyna
1.1 Warning: PHP Startup: Unable to load dynamic library 1.1.1 现象 如下错误信息: Warning: PHP Startup: Un ...
- Py_Initialize fails - unable to load the file system codec
Py_Initialize fails - unable to load the file system codec https://stackoverflow.com/questions/56947 ...
- WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-
报错: WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform- using builti ...
- 解决:XCODE 4.2 无法连接SVN,提示:Unable to load revisions
解决方法: 1)打开"终端" ---(英文:open a terminal) 2)输入 >svn checkout SERVER_PATH FOLDER_PATH_TO_PU ...
最新文章
- window.addeventlistener 不能调用方法_方法入门(基础篇五)
- 基于Spring Boot Profile的日志记录示例样本
- mysql语句二级查询_mysql_2 基本查询语句
- leetcode刷题:火柴拼正方形
- 3.5框架不能创建就加这一段代码
- python获取日期的年月日_python datetime和time的一些疑惑解答 及 获取上年同期、上月等日期...
- kubectl 重启pod_Part4:Pod对象的管理
- 215. Kth Largest Element in an Array
- 【大数据采集技术与应用】【第一章】【大数据采集技术与应用概述】
- 国内外免费sns源码程序大集合
- 运行报错 」 No version of NDK matched the requested version 20.0.5594570. Versions available locally: 20.
- 鱼眼镜头的成像原理到畸变矫正(完整版)
- 亿阳信通南宁 java笔试_亿阳信通面试笔试题及答案
- 正交补与矩阵的正交补
- Requests库常用方法及参数介绍
- 在vue项目中使用favicon.ico
- jQuery里面的 .on 和 .bind 的区别
- 获取上一个交易日—python
- 学术英语视听说2听力原文_大学英语新世纪视听说第二册听力原文及答案免费...
- json-server使用详解