写点什么

Flutter 开发之——运行卡在 gradle assembleDebug

用户头像
Android架构
关注
发布于: 20 小时前

dependencies {


classpath 'com.android.tools.build:gradle:4.1.0'


}


android\gradle\wrapper\gradle-wrapper.properties


distributionBase=GRADLE_USER_HOME


distributionPath=wrapper/dists


zipStoreBase=GRADLE_USER_HOME


zipStorePath=wrapper/dists


distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip

android/build.gradle(使用阿里云地址)

buildscript {


ext.kotlin_version = '1.3.50'


repositories {


//google()


//jcenter()


maven { url 'https://maven.aliyun.com/repository/google' }


maven { url 'https://maven.aliyun.com/repository/jcenter' }


maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}


}


dependencies {


classpath 'com.android.tools.build:gradle:4.1.0'


//classpath 'com.android.tools.build:gradle:3.5.2'


classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"


}


}


allprojects {


repositories {


//google()


//jcenter()


//mavenCentral()


maven { url 'https://maven.aliyun.com/repository/google' }


maven { url 'https://maven.aliyun.com/repository/jcenter' }


maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}


}


}

3.1.4 Flutter SDK 修改

Flutter SDK 的安装位置

D:\SoftWare\flutter

修改的文件位置(Flutter SDK\packages\flutter_tools\gradle)

aar_init_script.gradle


project.repositories {


maven {


//url "$storageUrl/download.flutter.io"


url "https://storage.flutter-io.cn/download.flutter.io"


}


}


flutter.gradle


repositories {


//google()


//jcenter()


maven { url 'https://maven.aliyun.com/repository/google' }


maven { url


《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》
浏览器打开:qq.cn.hn/FTe 免费领取
复制代码


'https://maven.aliyun.com/repository/jcenter' }


maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }


}


class FlutterPlugin implements Plugin<Project> {


//private static final String DEFAULT_MAVEN_HOST = "https://storage.googleapis.com";


private static final String DEFAULT_MAVEN_HOST = "https://storage.flutter-io.cn/download.flutter.io";


}


resolve_dependencies.gradle


repositories {


//google()


//jcenter()


//maven {url "$storageUrl/download.flutter.io"}


maven { url 'https://maven.aliyun.com/repository/google' }


maven { url 'https://maven.aliyun.com/repository/jcenter' }


maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}


maven {url "https://storage.flutter-io.cn/download.flutter.io"}


}

3.2 设置代理

首先开启代理(确定代理的端口号:8580)

设置代理 1

依次点击:File—>Settings—>Appearance&Behavior—>System Settings—>HTTP Proxy



点击Check connection,输入外网网址如(https://youtube.com/)


代理设置 2(gralde.properties)

systemProp.http.proxyHost=proxy.company.com


systemProp.http.proxyPort=443


systemProp.http.proxyUser=username


systemProp.http.proxyPassword=password


systemProp.http.auth.ntlm.domain=domain


systemProp.https.proxyHost=proxy.company.com


systemProp.https.proxyPort=443


systemProp.https.proxyUser=username


systemProp.https.proxyPassword=password


systemProp.https.auth.ntlm.domain=domain


此处,没有密码,顾设置如下


systemProp.http.proxyHost=127.0.0.1


systemProp.http.proxyPort=8580


systemProp.https.proxyHost=127.0.0.1


systemProp.https.proxyPort=8580

用户头像

Android架构

关注

还未添加个人签名 2021.10.31 加入

还未添加个人简介

评论

发布
暂无评论
Flutter开发之——运行卡在gradle assembleDebug