gradle

https://services.gradle.org/distributions/

开发工具下载

https://nativesupport.dcloud.net.cn/AppDocs/usesdk/android

https://nativesupport.dcloud.net.cn/AppDocs/download/android

创建项目

https://nativesupport.dcloud.net.cn/AppDocs/usesdk/android

常见问题

Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

#Tue Jun 29 12:01:57 CST 2021
distributionBase=GRADLE_USER_HOME
#distributionUrl=https\\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https:\\//cdn.rg1008.com/gradle/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

gradle 代理配置

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        mavenLocal()
        mavenCentral()
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:6.7.1"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        mavenLocal()
        mavenCentral()
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


运行首个项目

文档更新时间: 2021-07-01 08:00   作者:admin