Error: package com.google.android.gms.ads does not exist Solved

(531 Views)


Android Studio is been used by large number of developers to build an Android Application. Most of the time, developers waste their time solving multiple Android Studio IDE issues related to various libraries. But there is always a solution for the problem.

If you are facing any of these errors,

  • package com.google.android.gms.ads does not exist
  • package com.google.android.gms.ads.reward does not exist
  • cannot find symbol class RewardedVideoAd
  • cannot find symbol variable MobileAds
  • package AdRequest does not exist

Follow these steps to solve these errors:

  • Import google-play-services_lib that is located in the folder
    <android-sdk-directory>/extras/google/google_play_services/libproject/google-play-services_lib
    and add it as a library in your Android Studio project.

  • Add following code in the build.gradle dependencies

  • implementation 'com.google.android.gms:play-services-ads:15.0.0'

Solution Worked 3 UpvotesUpvote

        

Solution Didn't Worked 1 DownvotesDownvote



Comments



Search