I have a small Android app which uses AdMob. It has been working fine for a while. Recently, I tried to add some new features, and at the same time to upgrade all used libraries to most recent version. But I have a problem with AdMobs. I did put
implementation 'com.google.android.gms:play-services-ads:15.0.1'
into app build.gradle,
maven {
url "https://maven.google.com"
}
into project build.gradle, add changes to manfest file(ass suggested by Google developers site), did couple of Clean/Build and Invalidate Caches/Restart, checked SDK manager for Google Play services, all with no result, AndroidStudio can't resolve com.google.android.gms.ads.MobileAds and other AdMobs classes. For all statments like
import com.google.android.gms.ads.MobileAds;
AndroidStudio marks as unsolvable e.g "Cannot resolve symbol 'MobileAds' ".
What is more confusing, the app can be built and deployed, Gradle says no errors, the app works fine and the ads are displayed as wanted. But, there are some warnings in the Logcat such as:
- 'W/Ads: #004 The webview is destroyed. Ignoring action.',
- ...the Google Mobile Ads SDK will not integrate with Firebase (though I don't want to integrate it with Firebase)
etc.
Therefore, I cannot publish the upgraded app without being sure it functions the way I expect.
My working environment is Linux/Fedora27, AndroidStudio 3.1.4, and as virtual device I use Genymotion 2.12.2.