我正在制作一个带有AA(Android Annotations)的项目,但是,有时会运行并且有时会显示此错误。
帮助!
错误代码:
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
/Users/MacDeveloper/Desktop/projectTest/app/src/main/java/co/com/barricade/model/push/FCMService.java
Error:(30, 25) error: cannot find symbol class MasterActivity_
/Users/MacDeveloper/Desktop/projectTest/app/src/main/java/co/com/barricade/ui/content/categorias/CategoriasBigListFragment.java
Error:(52, 42) error: cannot find symbol class SucursalActivity_
/Users/MacDeveloper/Desktop/projectTest/app/src/main/java/co/com/barricade/ui/MasterActivity.java
Error:(82, 40) error: cannot find symbol class OfertaActivity_
Error:(86, 42) error: cannot find symbol class SucursalActivity_
Error:(89, 38) error: cannot find symbol class PerfilActivity_
Error:(90, 38) error: cannot find symbol class PreferenciasCategoriasActivity_
Error:(91, 38) error: cannot find symbol class TerminiosYCondicionesActivity_
Error:(92, 48) error: cannot find symbol class HistorialCuponesActivity_
Error:(94, 53) error: cannot find symbol class NotificacionesActivity_
Error:(97, 31) error: cannot find symbol class LoginActivity_
/Users/MacDeveloper/Desktop/projectTest/app/src/main/java/co/com/barricade/ui/content/categorias/CategoriasSmallListFragment.java
Error:(53, 42) error: cannot find symbol class SucursalActivity_
/Users/MacDeveloper/Desktop/projectTest/app/src/main/java/co/com/barricade/ui/content/categorias/CategoriasMapFragment.java
Error:(54, 42) error: cannot find symbol class SucursalActivity_
/Users/MacDeveloper/Desktop/projectTest/app/src/main/java/co/com/barricade/ui/content/cercadeti/almacenes/CercaDeTiAlmacenesBigListFragment.java
Error:(70, 5) error: org.androidannotations.annotations.Background can only be used in a class annotated with @org.androidannotations.annotations.EApplication, @interface org.androidannotations.annotations.EActivity, @interface org.androidannotations.annotations.EViewGroup, @interface org.androidannotations.annotations.EView, @interface org.androidannotations.annotations.EBean, @interface org.androidannotations.annotations.EService, @interface org.androidannotations.annotations.EIntentService, @interface org.androidannotations.annotations.EReceiver, @interface org.androidannotations.annotations.EProvider, @interface org.androidannotations.annotations.EFragment.
警告:(71,20)元素getVars()由BackgroundHandler无效 错误:任务':app:compileDebugJavaWithJavac'执行失败。
编译失败;请参阅编译器错误输出以获取详细信 信息:建筑失败 信息:总时间:46.817秒 信息:92个错误 信息:1警告 信息:请参阅控制台中的完整输出
答案 0 :(得分:0)
请确保在方法名称之前使用公共访问说明符。 改变
private void getVars()
to
public void getVars()