成功编译并运行flutter安卓的gradle文件范例

build.gradle

buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}

local.properties

sdk.dir=C:/Users/32148/AppData/Local/Android/Sdk
flutter.sdk=C:\\Android\\flutter_windows_3.13.2-stable\\flutter
flutter.buildMode=debug
flutter.versionName=0.0.1
flutter.versionCode=1

成功编译并运行flutter安卓的gradle文件范例_第1张图片

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=file\:///C:/gradle-7.5-all.zip

你可能感兴趣的:(Flutter学习日志,flutter,android)