Answer the question
In order to leave comments, you need to log in
When installing Admob ads, the project in Android studio gives an error "Unable to resolve dependency". What's the matter?
I add the following line to build.gradle in dependencies:
implementation 'com.google.android.gms:play-services-ads:17.2.0' I
sync, but I get an error:
Unable to resolve dependency for ':[email protected]/compileClasspath': Could not resolve com.google.android.gms:play-services-ads:17.2.0.
Tell me, what's the matter?
Answer the question
In order to leave comments, you need to log in
It was the same. There are two options:
-Error in writing a line in build.gradle
-Version 17.2.0 does not exist (try to add another version, a little older)
I had the same problem.
The program worked if I submitted the code in the manifest.
Not applicable:
manifest
application
meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="YOUR_ADMOB_APP_ID"
meta-data
application
manifest
Practicing:
manifest
application
meta-data
android:name="com .google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~3347511713"
meta-data
application
manifest
After that, in the build, the chervonim row was removed, and the program was successfully launched and showed test ads. You can fix the last version conflicts as described here https://support.google.com/admob/thread/3490101?hl=en
dependencies {
...
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.android.gms:play-services-ads:17.2.1'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-media-compat:28.0. 0'
implementation 'com.android.support:support-v4:28.0.0'
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question