I\'m trying to implement admob in my app, but the app failed to start after I added it.
This is the activity code: http://code.google.com/p/zhuang-dict/source/browse
If you have added Google AdView from the palette and app stopped working.
Go to "Gradle Scripts" folder in Android Studio Find the build.gradle(Module: app)
Remove this line from the file end
implementation 'com.google.android.gms:play-services-ads:18.1.1'
Save the file and Build the Project again. Everything will work fine again
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.gms:play-services-ads:18.1.1'
}