java - Android studio gradle 同步错误与 firebase : Response 204: No Content has no content

标签 java android firebase android-studio gradle

从今天早上开始,我无法在 android-studio 中同步我的 android 项目。

当我尝试这样做时,我每次都会遇到同样的错误: A part of the errors

所有这些错误都是由同一个问题引起的:

Caused by: java.io.IOException: Response 204: No Content has no content!

确实,当尝试手动访问该地址时,什么也没有 Example of one of them

知道它是在我这边还是在 google 的/maven 的?

项目 build.gradle :

    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:3.2.1"
        classpath "com.google.gms:google-services:4.2.0"
    }

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

模块构建.gradle :

    apply plugin: "com.android.application"

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.tmproject.nviseur.ticketless_compagnon"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    buildToolsVersion "28.0.3"
}

dependencies {
    implementation fileTree(include: ["*.jar"], dir: "libs")
    implementation "com.android.support:appcompat-v7:28.0.0"
    implementation "com.android.support:support-media-compat:28.0.0"
    implementation "com.android.support:exifinterface:28.0.0"
    implementation "com.android.support:support-v4:28.0.0"
    implementation "com.android.support.constraint:constraint-layout:1.1.3"
    testImplementation "junit:junit:4.12"
    androidTestImplementation "com.android.support.test:runner:1.0.2"
    androidTestImplementation "com.android.support.test.espresso:espresso-core:3.0.2"
    implementation "com.google.firebase:firebase-core:16.0.5"
    implementation "com.google.firebase:firebase-ml-vision:18.0.1"
    implementation "com.journeyapps:zxing-android-embedded:3.6.0"
    implementation "com.google.code.gson:gson:2.8.5"
}
apply plugin: "com.google.gms.google-services"

最佳答案

我今天早上遇到了同样的问题。它昨天还在工作。

我注意到这个问题只存在于 android studio 中。 当我使用命令行构建应用程序时,一切正常。

命令:./gradlew clean assembleDebug (mac os)

关于java - Android studio gradle 同步错误与 firebase : Response 204: No Content has no content,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53408816/

相关文章:

Firebase Firestore 读取和定价

java - 尝试将对象添加到数组列表时出现空错误(简单的代码段)

java - MqttPahoMessageHandler 和重连率管理

java - 连接可扩展字符串和字符串

c# - 是否可以录制游戏中的声音,将其保存,然后使用C#将其作为常规歌曲在手机上播放?

android - 在Kotlin和Android中以MVVM模式保持应用程序状态的正确方法

java - 从启动时启动的服务访问资源

javascript - Vue 和 Firebase 问题 : Error: function crashed out of request scope Function invocation was interrupted

java - 两种类型的向下转型之间的区别

html - 如何同步 HTML5 local/webStorage 和服务器端存储?