在开发项目中,xml文件突然出现
Couldn’t resolve resource @color/title_color (58 similar errors not shown)问题,让人措手不及,将颜色等资源文件直接写上就没有问题,但是不是根本解决问题的方法,后来在stack overflow上发现可以这样说:
Android Studio just gets crazy. But a restart ain’t always enough.
Invalidate your caches and restart.
File -> Invalidate Caches / Restart… -> Invalidate and Restart
按照上述做法,效果不错,解决了我的问题,原来AS本身也有缓存
参考:http://stackoverflow.com/questions/8390733/relativelayout-couldnt-resolve-resource-android