Android Studio suddenly cannot resolve symbols

后端 未结 28 2562
南笙
南笙 2020-11-22 04:42

Android Studio 0.4.2 was working fine and today I opened it and almost everything was red and the auto-completion had stopped working. I look at the imports and AS seems to

28条回答
  •  孤独总比滥情好
    2020-11-22 05:04

    I had a similar problem when I rebuilt an aar file and replaced the older one in my project with the new one. I went through all the solutions here and none solved my issue. I later realised that minifyEnabled had been set to true in the library project which effectively removed a lot of dead code that was not being used in the library project.

    My solution was to set minifyEnabled to false in the library project, assemble the aar, copied it into my project, invalidated caches and synced the grade project and everything worked fine.

提交回复
热议问题