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

Note
  • 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 APK
  • androidannotations-X.X.X.jar is the processor JAR, it is only needed at compile time, and must be in the compiler classpath.

Steps

  1. Put androidannotations-X.X.X-api.jar in the libs folder
  2. Put androidannotations-X.X.X.jar in a different folder, such as compile-libs. androidannotations-X.X.X.jar must not go in the libs folder.(注意,jar包不能放到lib文件夹或其子目录)
  3. Right-click on your project, choose "Properties"
  4. Go to Java Compiler and make sure that Compiler compliance level is set to 1.6, otherwise the processor won't be activated
  5. Go to Java Compiler > Annotation Processing and choose Enable annotation processing
  6. Go to Java Compiler > Annotation Processing > Factory Path and add the processor JAR : androidannotations-X.X.X.jar.
  7. Confirm the workspace rebuild
  8. 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).
  9. 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 jar androidannotations-X.X.X.jar in the libs folder.

  • If you get a java.lang.NoClassDefFoundError at runtime, please verify in project properties > Java Build Path > Order and Export that androidannotations-xxx-api.jar is checked.

Next step

  • Start using AndroidAnnotations

转载于:https://my.oschina.net/reborn87/blog/415716

关于Unable to load annotation processor factory 的故障相关推荐

  1. unable to load annotation processor

    今天在新电脑上启动项目时,发现有个红叉叉,以前貌似没见过,百度之后决定记录一下,报错信息是,unable to load annotation processor XXX,解决方法: 说无法加载ann ...

  2. 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 ...

  3. 秒懂Android注解处理器(Android Annotation Processor)

    [版权申明]非商业目的可自由转载 博文地址:https://blog.csdn.net/ShuSheng0007/article/details/90734159 出自:shusheng007 文章目 ...

  4. Java编译时注解处理器(Annotation Processor)详解

    上篇文章我们使用注解+反射实现了一个仿ButterKnife功能的示例.考虑到反射是在运行时完成的,多少会影响程序性能.因此,ButterKnife本身并非基于注解+反射来实现的,而是用Annotat ...

  5. Hadoop “Unable to load native-hadoop library for y

    2019独角兽企业重金招聘Python工程师标准>>> http://devsolvd.com/questions/hadoop-unable-to-load-native-hado ...

  6. 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 ...

  7. 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 ...

  8. 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 ...

  9. 解决:XCODE 4.2 无法连接SVN,提示:Unable to load revisions

    解决方法: 1)打开"终端" ---(英文:open a terminal) 2)输入 >svn checkout SERVER_PATH FOLDER_PATH_TO_PU ...

最新文章

  1. window.addeventlistener 不能调用方法_方法入门(基础篇五)
  2. 基于Spring Boot Profile的日志记录示例样本
  3. mysql语句二级查询_mysql_2 基本查询语句
  4. leetcode刷题:火柴拼正方形
  5. 3.5框架不能创建就加这一段代码
  6. python获取日期的年月日_python datetime和time的一些疑惑解答 及 获取上年同期、上月等日期...
  7. kubectl 重启pod_Part4:Pod对象的管理
  8. 215. Kth Largest Element in an Array
  9. 【大数据采集技术与应用】【第一章】【大数据采集技术与应用概述】
  10. 国内外免费sns源码程序大集合
  11. 运行报错 」 No version of NDK matched the requested version 20.0.5594570. Versions available locally: 20.
  12. 鱼眼镜头的成像原理到畸变矫正(完整版)
  13. 亿阳信通南宁 java笔试_亿阳信通面试笔试题及答案
  14. 正交补与矩阵的正交补
  15. Requests库常用方法及参数介绍
  16. 在vue项目中使用favicon.ico
  17. jQuery里面的 .on 和 .bind 的区别
  18. 获取上一个交易日—python
  19. 学术英语视听说2听力原文_大学英语新世纪视听说第二册听力原文及答案免费...
  20. json-server使用详解

热门文章

  1. jquery选择器小知识点们
  2. Active Directory系列之五:Active Directory的主要还原
  3. CVE-2021-3560的漏洞说明及利用流程
  4. 联合国超10万名员工记录遭泄露
  5. 有人公开了Avast、McAfee 等杀软中的 8 个 0day
  6. 谷歌全球服务均宕机,系因内部存储配额问题引发
  7. 注解之RetentionPolicy,ElementType
  8. iOS提交TestFlight测试显示缺少合规证明
  9. bootstrap在 刷新页面,tab选择页面不会改变。
  10. SharePoint Server 2016 部署安装(七)—— 配置SharePoint Server