gpt4 book ai didi

android - 如何设置 Android Studio 以便在离线时(断开与互联网的连接)进行编译

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:57:32 25 4
gpt4 key购买 nike

我今天在 androidstudio 工作,我的构建开始失败。令我惊讶的是,我失去了互联网连接,无法再构建我的代码。

build.gradle 文件包含以下内容:

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.3'
}
tasks.withType(Compile) {
options.encoding = "UTF-8"
}
}
apply plugin: 'android-library'

dependencies {
compile files('libs/android-support-v4.jar')
}
...

那么 ... 我该如何重新配置​​我的开发环境,更改我的 build.gradle 并做任何其他必要的事情来允许 android 离线开发。

注意:编辑问题以从存储库中删除 mavenLocal(),因为它是为了自己解决这个问题而添加的

最佳答案

Android Studio 0.4.0 添加了这个功能:

来自发行说明:

关于android - 如何设置 Android Studio 以便在离线时(断开与互联网的连接)进行编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19531455/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com