无法加载类的模块适配器.请确保为此模块运行代码生成

 紫藤老君的八卦炉 发布于 2023-01-15 11:17

我尝试运行我的应用程序时收到此错误:

E/AndroidRuntime(2314): java.lang.RuntimeException: 
    Unable to create application in.mubble.billbytwo.GlobalApp: 
    java.lang.IllegalStateException: Module adapter for class 
    in.mubble.billbytwo.RootModule could not be loaded. 
    Please ensure that code generation was run for this module.

我想我正在使用基于Ant的构建系统我不确定,这是我的第一个dagger项目,我在Eclipse IDE上.

PS:我已经尝试过将java-writer和dagger-compiler添加到工厂路径,因为其他一些帖子建议但没有运气.

这是一个完整的堆栈跟踪:

FATAL EXCEPTION: main
Process: in.mubble.billbytwo, PID: 2314
java.lang.RuntimeException: 
    Unable to create application in.mubble.billbytwo.GlobalApp:    
    java.lang.IllegalStateException: Module adapter for class 
    in.mubble.billbytwo.RootModule could not be loaded. 
    Please ensure that code generation was run for this module.

at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4347)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller
    .run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)

Caused by: java.lang.IllegalStateException: 
   Module adapter for class 
   in.mubble.billbytwo.RootModule could not be loaded. 
   Please ensure that code generation was run for this module.
at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:45)
at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:40)
at dagger.internal.Memoizer.get(Memoizer.java:56)
at dagger.internal.FailoverLoader.getModuleAdapter(FailoverLoader.java:57)
at dagger.internal.Modules.loadModules(Modules.java:43)
at dagger.ObjectGraph$DaggerObjectGraph.makeGraph(ObjectGraph.java:174)
at dagger.ObjectGraph$DaggerObjectGraph.access$000(ObjectGraph.java:138)
at dagger.ObjectGraph.create(ObjectGraph.java:129)
at in.mubble.billbytwo.Injector.init(Injector.java:13)
at in.mubble.billbytwo.Injector.init(Injector.java:24)
at in.mubble.billbytwo.GlobalApp.onCreate(GlobalApp.java:67)
at android.app.Instrumentation
    .callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)

请帮助解决此问题.

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有