gpt4 book ai didi

android - 无法建立同意书库:1.0.7

转载 作者:行者123 更新时间:2023-12-03 05:07:56 25 4
gpt4 key购买 nike

当我添加[https://developers.google.com/admob/android/eu-consent]]后,我无法构建我的项目
我得到以下错误!

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.google.android.ads.consent:consent-library:1.0.7.


buildscript {

repositories {
jcenter()
google()
// maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'

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

allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
}



dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.google.android.gms:play-services-ads:17.1.1'
implementation 'com.google.android.ads.consent:consent-library:1.0.7'

}

最佳答案

您提供的链接指出,只有1.0.6版本:

implementation "com.google.android.ads.consent:consent-library:1.0.6"

为了使其正常工作,您还需要将此插件添加到 buildscript依赖项中:
classpath "com.google.gms:google-services:4.2.0"

并在文件底部应用该插件:
apply plugin: "com.google.gms.google-services"

并且需要将 google-services.json文件添加到项目中,该文件提供 ga_trackingId ...请参阅 documentation

关于android - 无法建立同意书库:1.0.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54525629/

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