Firebase连接错误 [英] Firebase connection error

查看:69
本文介绍了Firebase连接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,





Build.gradle< app>

Hello,


Build.gradle <app>

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId 'com.my.app'

        manifestPlaceholders = [onesignal_app_id : "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                                // Project number pulled from dashboard, local value is ignored.
                                onesignal_google_project_number: "REMOTE"]

        minSdkVersion 17
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/fonts'] } }
    productFlavors {
    }
}
repositories {
    mavenCentral()
    jcenter()
    maven { url 'https://jitpack.io' }
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.18.5'
    implementation 'com.android.support:appcompat-v7:26.1.0'
    testImplementation 'junit:junit:4.12'
    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'com.google.android.gms:play-services-ads:11.8.0'
    compile 'com.google.android.gms:play-services-gcm:11.8.0'
    compile 'com.google.android.gms:play-services-analytics:11.8.0'
    compile project(':library')
    compile 'com.onesignal:OneSignal:3.+@aar'
    compile files('libs/YouTubeAndroidPlayerApi.jar')
}





Build.gradle< program>



Build.gradle <program>

// 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.3.2'
        classpath 'com.google.gms:google-services:4.0.1'
        classpath 'com.google.firebase:firebase-plugins:1.0.4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

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





Build.gradle< library>



Build.gradle <library>

apply plugin: 'com.android.library'

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'

    defaultConfig {
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
dependencies {
    compile 'com.android.support:support-v4:19.+'
    compile files('libs/NineOldAndroid-2.4.0.jar')
    compile files('libs/picasso-2.5.2.jar')
}









Firebase连接错误:

无法解析Android应用程序模块的Gradle配置。解决gradle构建问题和/或重新同步。



屏幕照片:

https://imgur.com / a / pwBoG8e



我尝试过:



混合





Firebase Connection Error:
Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync.

Screen Photo:
https://imgur.com/a/pwBoG8e

What I have tried:

Mixed

i tried a lot of things but none worked

推荐答案

您是否添加了json文件?如果是,那么它是否位于项目标题中的根应用程序目录中。如果是,请尝试进入工具菜单并选择firebase。选择您想要用它做什么,以及auth或实时数据库。点击连接,它会将您的应用连接到Firebase。您可能还需要选择一个项目
Have you added the json file?If yes, then is it in the root app directory in the project header. If yes, try going to tools menu and select firebase. Choose what you want to do with it and like auth or realtime database. Click connect and it will connect your app to Firebase.You may also need to select a project


这篇关于Firebase连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆