Let me explain what I have done so I have started getting this error. Newly I have implemented AdMob Mediation within my game project.
So I have integrated Chartboost Mediation plugin within my project and from first to last I have followed this document:
Additionally, I have added Chartboost.jar and android-support-v4.jar files within my Plugins/Android folder.
After doing these steps my project started crashing on start and before it was working fine because I have a backup of the previous version of my Unity project.
Confirm, have multiple crashes with AdMob Mediation and com.moat.analytics crashes. We also use Chartboost and some other mediation plugins. I’ve contacted with AdMob team, they told me they don’t have anything related to Moat Analytics in their codes, so they won’t care about it.
So, same issue here, but I have a lot of plugins integrated and it all works fine(IronSource, Amplitude, Google Play Games, some other native plugins) but when I added EasyMobile Pro plugin, it’s start crashing with the same Issue. So, is there any solutions?
First of all, I found and install PlayServicesResolver 1.2.95 and it don’t download androidx libraries - it is what we need.
Secondly, run force resolve to download old androd libraries.
You should check that you plugins folder don’t contain any androidx libs, and use only android libs to avoid any errors. Also waiting for normal support for androidx. Good luck)
No, I can’t able to solve this problem so I have removed the Chartboost ad network from my project and integrated other ad networks within my Admob Mediation setup.
Because only Chartboost giving me this kind of problems.
Solved. If you have a crash in Chartboost Unity with AndroidX and have an error “android.support.v4.content.ContextCompat”:
The problem is that current chartboost library from sdk not “jetified”.
“The standalone Jetifier tool migrates support-library-dependent libraries to rely on the equivalent AndroidX packages instead.”
1). Download jetifier
2). After you integrate Chartboost to unity project, select “chartboost.jar” from Assets\Plugins\Android\ChartboostSDK\libs\chartboost.jar
rename it to “chartboostX.jar” and use command: