Невозможно построить библиотеку согласия: 1.0.7 - PullRequest
0 голосов
/ 05 февраля 2019

Я не могу построить свой проект при добавлении. Я следую [https://developers.google.com/admob/android/eu-consent] Я получил ошибку ниже!

Невозможно разрешить зависимость для ': app @ debug / compileClasspath':Не удалось разрешить com.google.android.ads.consent: библиотека согласия: 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 голосов
/ 05 февраля 2019

есть только версия 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... см. документацию .

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...