简体   繁体   English

设置Android Studio以脱机工作

[英]Setting up Android Studio to work offline

I do job in an area where there is no internet connection. 我在没有互联网连接的地方工作。 I wanted to develop Android apps using Android Studio, but for the Gradle build it needs an internet connection. 我想使用Android Studio开发Android应用程序,但对于Gradle构建,它需要互联网连接。 Is there a way in which I can completely setup Android Studio to work offline? 有没有办法让我可以完全设置Android Studio脱机工作?

I have tried many answers on Stack Overflow but none worked. 我已经在Stack Overflow上尝试过很多答案,但都没有效果。 Else, suggest me some other ways to make Android apps completely offline. 另外,建议我使用其他方法让Android应用程序完全脱机。

Before moving to area where you don't have an internet connection, sync project to download all dependencies. 在移动到没有互联网连接的区域之前,请同步项目以下载所有依赖项。 Next gradle providing options, Offline work . 下一个gradle提供选项, 离线工作

File -> Settings -> Build, Execution, Deployment -> Gradle and turn on option Offline Work. 文件 - > 设置 - > 构建,执行,部署 - > Gradle并打开选项Offline Work。 That is it. 这就对了。

In Android Studio open the settings and search for offline it will find the Gradle category which contains Offline work . 在Android Studio中打开设置并搜索离线 ,它将找到包含离线工作Gradle类别。 You can enable it there. 你可以在那里启用它。

Gradle离线工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM