프로그래밍/ 안드로이드어플만들기

안드로이드 앱 빌드 오류 - com.google.android.gms:play-services-ads version 19.3.0 has been reported as problematic by its author and will block publishing of your app to Play Console

kugancity 2023. 8. 15. 23:23
반응형

 

 

 

안드로이드 스튜디오 & gradle을 업데이트 하면서 발생하는 에러들을 하나씩 수정하고 있다.

 

 

 

앱 번들파일에서 play-services-ads 패키지 현재 버전에 문제가 있다고 에러가 발생하였다. 

 

com.google.android.gms:play-services-ads version 19.3.0 has been reported 
as problematic by its author and will block publishing of your app to Play Console

 

play-services-ads 패키지 19.30.0 버전을 22.2.0 버전으로 업데이트 하였다.

그 후 다시 빌드를 하려고 했더니 아래 에러가 발생하였다. 

 

Cannot resolve symbol 'InterstitialAd' 

 

 


 

스택오버플로우 관련 답변 

 

If you get this error after updating your com.google.android.gms:play-services-ads dependency to a more recent version, know that importing com.google.android.gms.ads.InterstitialAd has been deprecated since version 19.7.0 and has since been totally removed.

The new import should be:

import com.google.android.gms.ads.interstitial.InterstitialAd;

Either revert com.google.android.gms:play-services-ads to a version pre-19.7.0 or update your code by following the documentation here: https://developers.google.com/admob/android/interstitial.

 

https://stackoverflow.com/questions/69880113/error-cannot-find-symbol-import-com-google-android-gms-ads-interstitialad

 

 

 

//import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.interstitial.InterstitialAd;

 

위와 같이 수정하고 전면광고 관련  코드들도 아래 사이트 참조해서 다 수정하였다. 

 

 

https://developers.google.com/admob/android/interstitial?hl=ko 

 

전면 광고  |  Android  |  Google for Developers

이 페이지는 Cloud Translation API를 통해 번역되었습니다. Switch to English 전면 광고 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요. 전면 광고는 호스트 앱의 인터

developers.google.com

 

 

 

728x90
반응형