Android Studio cannot resolve symbol from imported module

拜拜、爱过 提交于 2019-12-10 11:26:10

问题


I have an android app that worked great. I have imported the ActiveAndroid project as a module because I did a change on the Model's file (I added a setId method, and that's why I can't use the gradle's version). I was using Android Studio 1.5 and gradle 1.5.0. I have updated the android studio version to 2.2 (which make me update the gradle version to 2.2.0-alpha1. Then now, the import of active android fails. For instance:

import com.activeandroid.Model;

Detects an error: cannot resolve symbol 'Model'. What is going on? How can I solve that issue?

Thanks a lot!


回答1:


It's a bug in Android Studio 2.2 Preview 1. It's reported here: https://code.google.com/p/android/issues/detail?id=210255




回答2:


You can do "File" -> "Invalidate Caches...", and select "Invalidate and Restart" option to fix this.



来源:https://stackoverflow.com/questions/37459524/android-studio-cannot-resolve-symbol-from-imported-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!