gpt4 book ai didi

android - 找不到 com.google.firebase :firebase-core:9. 0.0

转载 作者:IT老高 更新时间:2023-10-28 21:51:11 27 4
gpt4 key购买 nike

在遵循有些不一致的说明后herehere执行 gradle 同步时出现错误提示 could not find com.google.firebase:firebase-core:9.0.0

对为什么会发生这种情况有任何想法吗?

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
}

最佳答案

首先,您需要将Play Services Library更新为rev.30:

enter image description here

然后你在这一行有一个小问题:

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

您可能需要将其更正为:

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

关于android - 找不到 com.google.firebase :firebase-core:9. 0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37307859/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com