如何在 android studio 中禁用 gradle '离线模式'?

2023-01-03移动开发问题
5

本文介绍了如何在 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 '离线模式'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

从 Documents 目录存储和读取文件 iOS 5
Storing and reading files from Documents directory iOS 5(从 Documents 目录存储和读取文件 iOS 5)...
2024-08-12 移动开发问题
9

如何在 cocos2d 环境之外实现 cocos2d 游戏的虚拟摇杆?
How can I implement a virtual joystick for a cocos2d game outside the cocos2d environment?(如何在 cocos2d 环境之外实现 cocos2d 游戏的虚拟摇杆?)...
2024-08-12 移动开发问题
13

收到消息“警告:在正常情况下,_fillInQueueWithExtraSpace:.."和 MPMovieP
Got the message quot;WARNING: under normal conditions, _fillInQueueWithExtraSpace:..quot; and MPMoviePlayer rotation not work in iPad IOS 5.1(收到消息“警告:在正常情况下,_fillInQueueWithExtraSpace:..和 MPMoviePlayer 旋转在 iPad IOS 5.1 中...
2024-08-12 移动开发问题
6

RPG 游戏循环和类结构(cocos2D for iPhone)
RPG Game loop and class structure (cocos2D for iPhone)(RPG 游戏循环和类结构(cocos2D for iPhone))...
2024-08-12 移动开发问题
6

如何抓取 b2Body 并在屏幕上移动它?(cocos2d,box2d,iphone)
How to grab a b2Body and move it around the screen? (cocos2d,box2d,iphone)(如何抓取 b2Body 并在屏幕上移动它?(cocos2d,box2d,iphone))...
2024-08-12 移动开发问题
12

沙盒游戏中心回合事件通知不一致
Sandbox Game Center Turn Event Notifications Not Consistent(沙盒游戏中心回合事件通知不一致)...
2024-08-12 移动开发问题
4