[android]代码库
// 1、文末的代码片段放在根目录的 build.gradle 的最后
// 2、gradle-wrapper.properties 最后一行改为 distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
//即可解决以下大部分问题
// Error:Could not find org.jetbrains.trove4j:trove4j:20160824
// Could not find method google() for arguments [] on repository container
// No cached version of com.android.tools.build:gradle:3.1.4 available for offline mode
// Gradle sync failed: No cached version of com.android.tools.build:gradle:6.2
// Gradle sync failed: No cached version of com.android.tools.build:gradle
// name was tagged at AndroidManifest.xml:27 to replace other declarations bu
// Could not get resource” Android Studio Gradle Sync Error
// er: Bad Request > Failed to list versions for com.tencent.bugly:
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
google()
maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
jcenter()
google()
maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
}
初级程序员
by: 藤原千花 发表于:2020-04-20 20:26:21 顶(3) | 踩(3) 回复
666
回复评论