- Home /
Unity Android java.lang.ClassNotFoundException
I am trying to integrate Google AdMob
and PlayServices
to my mobile game in Unity. Firstly, I started with PlayServices and added Achievemets and Leaderboard and tryied to build my app to test. It was OK. Then I started integrating AdMob. After import and resolving packages it says that "Resolution Succeeded".
When I try to run my app in Unity it works fine. But after building the app for android I get errors saying java.lang.ClassNotFoundException
. com.google.android.gms.ads.initialization.OnInitializationCompleteListener
and com.google.android.gms.games.Games
I suggest that it is associated with building process and I think that while Unity optimizes some things it removes these classes (I read that in other topics). But I disabled Managed Striping Level
and Minify
options in Player Settings
and it didn't help.
Additional info: I use Unity 2020.1.0f1
, GoogleMobileAds-v5.3.0
, GooglePlayGamesPlugin-0.10.10
P.S.: Thanks for help!
I am having the same issue. Any updates? I in my case opened the exported project and the library and class are there?!
Answer by unity_MXGApNcapNfNLg · Sep 07, 2020 at 06:39 AM
@Kotique333 Goto Player Setting > Publishing Setting > Minify and select none for Release.
Your answer
Follow this Question
Related Questions
Unity Android plugin problem build CommandInvokationFailure 2 Answers
problems with implementing Admob banner ads 0 Answers
Admob and GooglePlayGames not working together 1 Answer
How to set mobile control and scale in size in android setting? 1 Answer
How to make Input.GetAxis work on certain area only? 0 Answers