View->Tool Windows->Gradle->Toggle button of online/offline 点击上图的按钮,开启offline模式即可,新版的AS的offline在gradle 窗口,不在setting里面。