Добавить базу данных в реальном времени с android studio firebase - PullRequest
0 голосов
/ 17 января 2020
apply plugin: 'com.android.application'

android 
{

    compileSdkVersion 24
    buildToolsVersion "28.0.3"
    defaultConfig {
        applicationId "com.example.asus.salestrackingsystem"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })'

    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.google.firebase:firebase-auth:16.0.5'
    compile 'com.google.firebase:firebase-database:16.0.5'
    testCompile 'junit:junit:4.12'
}



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

, но по-прежнему не удается добавить базу данных в реальном времени, помощник Firebase постоянно просит добавить базу данных в реальном времени в ваше приложение. кто-нибудь может мне помочь?

Ответы [ 2 ]

0 голосов
/ 17 января 2020

добавить эти зависимости для интеграции базы данных Firebase в реальном времени:

    implementation 'com.google.firebase:firebase-auth:16.1.0' // this is for user registration
    implementation 'com.google.firebase:firebase-database:16.0.5' // this for database 
    implementation 'com.google.firebase:firebase-core:16.0.5' // this is for core functionality 
    implementation 'com.google.firebase:firebase-messaging:17.3.4' // this is for notifications
    implementation 'com.google.firebase:firebase-storage:16.0.5' // this is for storage 
    implementation 'com.google.android.gms:play-services-auth:16.0.1' // this is for user authentication


classpath 'com.google.gms:google-services:4.2.0' // this will be added in project level gradle file
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...