[英]Why doesn't Android Studio generate library classes for Dagger or DBFlow?
A few days ago I started to experience a weird problem with Android Studio.几天前,我开始在使用 Android Studio 时遇到一个奇怪的问题。 Every time I try to build my project I keep getting每次我尝试构建我的项目时,我都会不断得到
for each class it should generate.对于每个 class 它应该生成。 I am using Dagger and DBFlow.我正在使用 Dagger 和 DBFlow。
By scrolling all the Build Output logs I am getting通过滚动我得到的所有 Build Output 日志
I tried to add the dependency manually like this我试图像这样手动添加依赖项
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
but it keeps failing to build.但它一直无法构建。
I also noticed that it keeps changing languageLevel="JDK_1_8"
to languageLevel="JDK_11"
in the misc.xml file even though I am using Java 8.我还注意到它在 misc.xml 文件中不断将languageLevel="JDK_1_8"
更改为languageLevel="JDK_11"
,即使我使用的是 Java 8。
I also tried everything I found here from deleting the.idea folder to uninstalling Android Studio a few times unsuccessfully.我还尝试了我在此处找到的所有内容,从删除.idea 文件夹到卸载 Android Studio 几次均未成功。
There were other errors in the logs.日志中还有其他错误。 I had to scroll all of them and look for the one that caused the issue.我不得不滚动所有这些并寻找导致问题的那个。 Once it was fixed everything worked as planned.一旦它被修复,一切都按计划进行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.