Android Studio suddenly cannot resolve symbols

后端 未结 28 2897
南笙
南笙 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:01

    Struggled with the same problem for a couple hours this morning. Building my project from command line seems to have done the trick for me.

    Exact steps -

    1. Cloned fresh repository (no Android studio files are in repo)
    2. Built debug project from command line ( ./gradlew clean assembleDebug )
    3. Open Android Studio, import project

    To check if it worked, look in your projects exploded-bundles folder, inspect a library and find the classes.jar. If it is expandable, then everything is going to be ok.

    edit - I found after doing a clean within Android studio, it broke again. So if you have to clean, you will need to do this process again.

提交回复
热议问题