1:file setting httpproxy 对内网进行代理设置,保证可以访问内部网络
2:根目录的build.gradle
去掉:
plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
}
添加:
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' } // jcenter
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } // gradle-plugin
maven { url 'https://maven.aliyun.com/repository/central' } // central
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.2"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.17'
// GreenDao插件
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0' // add plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
完事~~~
网友评论