找不到com.google.firebase:firebase-core:9.0.0 [英] could not find com.google.firebase:firebase-core:9.0.0

查看:136
本文介绍了找不到com.google.firebase:firebase-core:9.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遵循



然后你有一个

  freeCompile'c​​om.google.firebase:firebase-ads:9.0.0:9.0.0' 

您可能需要将其更正为此:

  freeCompile'c​​om.google.firebase:firebase-ads:9.0.0'


After following the somewhat inconsistent instructions here and here I get an error when performing a gradle sync saying could not find com.google.firebase:firebase-core:9.0.0

Any ideas to why this is happening?

app/build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
        free {
            applicationId ... 
        }

        paid {
            applicationId ... 
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:support-v4:23.3.0'

    freeCompile 'com.google.firebase:firebase-core:9.0.0'
    freeCompile 'com.google.firebase:firebase-ads:9.0.0:9.0.0'
}

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

root/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.0'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        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
}

解决方案

First, you need to update Play Services Library to rev.30:

and then you have a little issue in this line:

freeCompile 'com.google.firebase:firebase-ads:9.0.0:9.0.0'

you probably need to correct it to this:

freeCompile 'com.google.firebase:firebase-ads:9.0.0'

这篇关于找不到com.google.firebase:firebase-core:9.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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