Android Studio 导入系统源码后,一直 scanning files to index 的解决方法

使用Android studio导入系统源码及跳转依赖配置,见:

https://blog.****.net/chen930724/article/details/57086699

 

导入后,遇到AS一直不停地 scanning files to index,在网上搜索,几乎全是这个解决方法:

File -> Invalidate Caches / Restart

但是,使用后依旧没有效果,于是发现只需要去掉勾选 “Generate sources automatically”即可:

Android Studio 导入系统源码后,一直 scanning files to index 的解决方法

如果去掉勾选后,点击 apply 时,出现错误:

Android Studio 导入系统源码后,一直 scanning files to index 的解决方法

只需要随便设置个manifest路径即可,这里我设置了framework下面core的manifest:

Android Studio 导入系统源码后,一直 scanning files to index 的解决方法

好了,这样就解决了。