首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Gradle错误:未能解决: com.google.firebase:firebase-core:16.0.1

Gradle错误:未能解决: com.google.firebase:firebase-core:16.0.1
EN

Stack Overflow用户
提问于 2018-06-11 20:34:53
回答 2查看 1.3K关注 0票数 2

编辑请正确阅读我的问题,因为你说的是重复的,没有解决我的问题!

编辑2请我再说一遍,虽然这个问题的解决方案并没有解决我的问题,为什么你总是重复它?!

我也有同样的问题:Failed to resolve: com.google.firebase:firebase-core:16.0.1,我已经做了所有的事情,就像答案一样!但问题依然存在!

这是我的分级项目级别

代码语言:javascript
运行
复制
buildscript {

    repositories {
        google()
        jcenter()
        mavenCentral()


    }

    dependencies {


        classpath 'com.android.tools.build:gradle:3.1.3'
        classpath 'com.google.gms:google-services:4.0.1'

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

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()

    }
}

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

下面是我的gradle应用程序级别:

代码语言:javascript
运行
复制
plugins {
    id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.0'
}

apply plugin: 'com.android.application'
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories {
    maven { url 'https://maven.google.com' }
}

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.example.miran3ma.wequest"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
         testInstrumentationRunner     "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true

        manifestPlaceholders = [onesignal_app_id               : "my-id",
                                   dashboard, local value is ignored.
                                onesignal_google_project_number: "REMOTE"]
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation 'com.onesignal:OneSignal:3.8.4'

    implementation('com.github.thekhaeng:pushdown-anim-click:1.0.7') {
        exclude group: 'com.android.support'
    }

    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.google.android.gms:play-services-auth:15.0.1'
    implementation 'com.android.support:support-vector-drawable:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.1'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    implementation 'com.google.firebase:firebase-crash:16.0.0'
    implementation 'com.google.firebase:firebase-auth:16.0.1'
    implementation 'com.google.firebase:firebase-core:16.0.0'
    testImplementation 'junit:junit:4.12'
    implementation 'com.valdesekamdem.library:md-toast:0.9.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.30.0'
    implementation 'com.google.maps.android:android-maps-utils:0.5'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    implementation 'net.steamcrafted:load-toast:1.0.12'
    implementation 'info.hoang8f:android-segmented:1.0.6'
    implementation 'com.google.android.gms:play-services-location:15.0.1'
    implementation 'me.grantland:autofittextview:0.2.1'
    // implementation 'com.wang.avi:library:2.1.3'

    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    implementation 'com.sothree.slidinguppanel:library:3.4.0'

    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

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

这个问题只有在更新到最新的firebase版本( 16 )之后才会出现。

如有任何帮助,将不胜感激,谢谢

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-10-10 11:58:11

对于有同样问题的人来说,这与导入OneSignal库有关。只需阅读最新的一个信号文档添加它,以便分级和错误将消失。

票数 0
EN

Stack Overflow用户

发布于 2018-06-13 11:57:19

代码语言:javascript
运行
复制
allprojects {
    repositories {
        jcenter()
        // Add this code block on your app
        maven {
            url "https://maven.google.com" // Google's Maven repository
        }
    }
}
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50805624

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档