簡體   English   中英

無法解決:com.google.firebase:firebase-core:9.6.1

[英]Failed to resolve : com.google.firebase:firebase-core:9.6.1

我想通過此鏈接使用Firebase實時數據庫 經過第六步,它給出

解決失敗

錯誤。

build.gradle應用模塊:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "gc.imageuploader"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.google.firebase:firebase-database:9.6.1'
}
apply plugin: 'com.google.gms.google-services'

build.gradle項目模塊:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'
        classpath 'com.google.gms:google-services:3.0.0'

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

allprojects {
    repositories {
        jcenter()
    }
}

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

那我該如何解決這個問題呢? 我該怎么辦? 您如何看待這個問題?

使用Firebase時,請確保安裝了最新版本的“ Google Play服務”“ Google存儲庫”

請按照以下步驟操作:

  1. 開啟Android Studio
  2. 轉到菜單欄>工具> Android> SDK Manager
  3. 單擊選項卡> SDK工具
  4. 檢查並安裝“ Google Play服務”“ Google存儲庫”
  5. 單擊“應用”並等待下載

最后,再次同步構建您的項目。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM