在Android Studio中: File–>Settings–>Editor–>General–>Auto Import 选中Optimizes imports on the fly,和Add unambiguous imports on the fly即可。