How to disable gradle #39;offline mode#39; in android studio?(如何在 android studio 中禁用 gradle 离线模式?)
问题描述
我是 android studio IDE 开发的新手.每次导入在 android studio 中开发的示例项目时,都会出现此错误..
I am new to android studio IDE development. Every time when I imported a sample project that developed in the android studio, I am getting this error..
没有可用的 com.android.tools.build:gradle:1.1.0 缓存版本用于离线模式.禁用 Gradle '离线模式'并同步项目.
No cached version of com.android.tools.build:gradle:1.1.0 available for offline mode. Disable Gradle 'offline mode' and sync project.
我该如何解决这个问题.
How can I solve this problem.
推荐答案
Android Studio 3.6+ 中的新位置
查看 >工具窗口 >来自菜单栏的 Gradle.
View > Tool Windows > Gradle from the menu bar.
然后,在 Gradle 窗口顶部附近,单击 Gradle 面板中的 Toggle Offline Mode Gradle offline 按钮.
Then, near the top of the Gradle window, click Toggle Offline Mode Gradle offline button in the Gradle panel.
旧答案
在 Windows 上:-
转到文件->设置.
然后打开'Build,Execution,Deployment'
.然后打开
构建工具 ->摇篮
然后取消选中 ->离线工作在右侧.
Then uncheck -> Offline work on the right.
点击确定按钮.
然后重建项目.
在 Mac 操作系统上:-
转到 Android Studio ->首选项,其余相同.或者按照图片中给出的步骤进行操作
go to Android Studio -> Preferences, and the rest is the same. OR follow steps given in the image
[
这篇关于如何在 android studio 中禁用 gradle '离线模式'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 android studio 中禁用 gradle '离线模式


- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01