android - 更改 Android Studio build.gradle 的默认值

标签 android android-studio jcenter

目前,当我创建一个新的 Android Studio 项目时,项目 build.gradle 文件如下所示(部分):

buildscript {
    repositories {
        jcenter()
    }

因为我在防火墙后面,所以我必须手动将其更改为:

buildscript {
    repositories {
        jcenter {
            url "http://jcenter.bintray.com/"
        }

没什么大不了的,但是有没有办法让 Android Studio 默认执行此操作?

最佳答案

您可以更改路径中的默认模板:

<android-studio>/plugins/android/lib/templates/gradle-projects/NewAndroidProject/root/build.gradle.ftl

关于android - 更改 Android Studio build.gradle 的默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42515734/

相关文章:

android - 从 node_modules 目录导入 React-Native Android 不起作用

java - Android 中 Paint.StrokeWidth = 1 的 drawLine 问题

android - Firestore bool 值在设置为 true 时返回 false

java - webview android 应用程序问题

maven - 无法从 JCenter 下载我在 Bintray 上发布的文件

android - 我的 Android 库存在于 Bintray 上,但不存在于 jCenter 上

android Google Play 警告 : SSL Error Handler Vulnerability

android - Gradle 混合版本警告

IDE 的 Android Studio 图形错误 - 双 View

android - Gradle项目同步失败,如何解决?