Android Studio “cannot resolve symbol” but project compiles and works

后端 未结 13 2316
我在风中等你
我在风中等你 2020-12-24 10:49

The project compiles fine. However, Android studio 3.0.1 shows reference to one particular library in red and displays \"cannot resolve symbol\". Even single stepping into

13条回答
  •  没有蜡笔的小新
    2020-12-24 11:19

    Following has resolved this for me.

    1. remove library from gradle cache (in case of linux, it's in ~/.gradle/caches).
    2. remove library dependency from the build.gradle and sync
    3. restart (maybe invalidate cache)
    4. add library dependency to build.gradle and sync
    5. clean and rebuild

提交回复
热议问题