상세 컨텐츠

본문 제목

java.lang.ClassNotFoundException: com.google.android.gms.ads.initialization.OnInitializationCompleteListener

개발생활/Unity Engine

by 한국인맛집 2022. 12. 26. 16:16

본문

반응형

 

progard를 추가해주면 깔끔하게 끝나는 문제입니다.

 

PlayerSettings -> Publishing Setting -> Build -> Custom progard File Check

 

Open  Progard.txt   [ Plugin/ Android/ progard-user.txt]

 

-keep class com.google.unity.** {
   *;
}
-keep public class com.google.android.gms.ads.**{
   public *;
}
-keep public class com.google.ads.**{
   public *;
}
-keepattributes *Annotation*
-dontobfuscate

 

위에 내용을 작성함

 

그리고.

 

Assets -> Exterminal Dependency Manager -> Android Resolver -> Force Resolver

 

실행 하면 정상동작

 

혹여나 중단되거나 에러가 나는경우

 

 

Editor 버전이 2020.xx  이상인경우

 

PlayerSettings -> Publishing Setting -> Build 

 

- Use r8 check  상태 확인해야함.

 

 

 

 

Reference 

https://medium.com/@radicho/how-to-implement-admob-in-unity-a-bit-more-detailed-guide-4baed2821cce

 

How to implement AdMob in Unity? A bit more detailed guide.

Some tips to avoid C# problems and how to solve the ClassNotFoundException unity.ads.UnityAdListener on Android.

medium.com

 

반응형

관련글 더보기