Я пытался импортировать проект Android сегодня, но он никогда не заканчивается.Gradle продолжает жаловаться на
Could not HEAD 'https://jcenter.bintray.com/com/google/android/gms/play-services-base/11.4.2/play-services-base-11.4.2.pom'. Received status code 409 from server:
Я попытался перейти по URL-адресу в журнале, который перенаправляет на https://jcenter.bintray.com/com/google/android/gms/play-services-base/11.4.2/play-services-base-11.4.2.pom, который затем дает следующий ответ.
{
"errors" : [ {
"status" : 409,
"message" : "Failed to read POM for 'com/google/android/gms/play-services-base/11.4.2/play-services-base-11.4.2.pom': expected START_TAG or END_TAG not TEXT (position: TEXT seen ...</dependencies>\\n \\ua0<l... @30:5) ."
} ]
}
Я нахожусь напотеря для того, что делать.Почему это происходит и что я могу сделать, чтобы решить эту проблему?
Проект build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://jitpack.io" }
google()
}
}
app / build.gradle
buildscript {
repositories {
jcenter()
maven { url 'https://www.testfairy.com/maven' }
}
dependencies {
classpath 'com.testfairy.plugins.gradle:testfairy:1.12'
classpath 'org.moallemi.gradle.advanced-build-version:gradle-plugin:1.6.0'
classpath "net.rdrei.android.buildtimetracker:gradle-plugin:0.11.+"
// classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.5.5'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
}
}
apply plugin: 'com.android.application'
apply plugin: 'testfairy'
apply plugin: 'org.moallemi.advanced-build-version'
apply plugin: "build-time-tracker"
apply plugin: 'com.getkeepsafe.dexcount'
//apply plugin: 'io.fabric'
dexcount {
format = "list"
includeClasses = false
includeFieldCount = true
includeTotalMethodCount = true
orderByMethodCount = true
verbose = false
maxTreeDepth = Integer.MAX_VALUE
teamCityIntegration = false
// enableForInstantRun = false
}
advancedVersioning {
nameOptions {
versionMajor 1
versionMinor 11
versionPatch new Date().format('yyMMdd') as int
versionBuild versionCode
}
codeOptions {
versionCodeType org.moallemi.gradle.internal.VersionCodeType.DATE
//dependsOnTasks 'testfairy', 'release' //, 'assemble'
}
outputOptions {
renameOutput true
nameFormat '$projectName-$buildType-$versionName'
}
}
android {
aaptOptions {
noCompress 'png', 'wav'
}
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
applicationId "xxx.xxx"
// testApplicationId "com.airbeem.airbeemsimulator"
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
versionCode advancedVersioning.versionCode //67
versionName advancedVersioning.versionName //"4.10-${new Date().format('yyMMdd')}"
multiDexEnabled true
}
signingConfigs {
release {
storeFile file('xxx')
storePassword 'xxx'
keyAlias 'xxx'
keyPassword 'xxx'
v2SigningEnabled true
}
debug.initWith(signingConfigs.release)
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
lintOptions {
abortOnError false
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "8g"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/rxjava.properties'
exclude 'error_prone/Annotations.gwt.xml'
exclude 'third_party/java_src/error_prone/project/annotations/Annotations.gwt.xml'
exclude 'third_party/java_src/error_prone/project/annotations/Google_internal.gwt.xml'
}
testfairyConfig {
apiKey "xxx"
iconWatermark true
testersGroups "android"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':xxx')
}
buildtimetracker {
reporters {
summary {
ordered false
threshold 50
barstyle "unicode"
}
}
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'