Android Studio says “cannot resolve symbol” but project compiles

发生 Android原先类 出现 “cannot resolve symbol” 问题,可参考下列网址实践
http://stackoverflow.com/questions/19508649/android-studio-says-cannot-resolve-symbol-but-project-compiles

No idea if this will work or not but my only thought so far: right click the jar file in file tree within AS and select "Add as library..."

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

EDIT 2: This fix should work for all similar incident


发生 Android原先类 出现 “cannot resolve symbol” 问题,可参考下列网址实践
http://stackoverflow.com/questions/19508649/android-studio-says-cannot-resolve-symbol-but-project-compiles

No idea if this will work or not but my only thought so far: right click the jar file in file tree within AS and select "Add as library..."

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

EDIT 2: This fix should work for all similar incidents and is not a twitter4j specific resolution.

--------
使用Android Studio 
File -> Invalidate Caches...." →选择 Invalidate and Restart