简体   繁体   中英

Can't Integrate Applovin with Admob mediation in Unity

Trying to add Applovin to Admob mediation in a Unity project.The app already had Admob ads working. I imported the Applovin SDK, and was able to build it without problems. Then I imported the Google Applovin Ads Mediation package. I set the Admob key as instructed in the Android Manifest, but now it won't compile.

When I build I get this error.

"The attribute activity#com.applovin.adview.AppLovinInterstitialActivity@configChanges=orientation|screenSize|smallestScreenSize|screenLayout in :com.applovin.applovin-sdk-9.9.1: collides with another value"

Then it says:

"Attribute activity#com.applovin.adview.AppLovinInterstitialActivity@configChanges value=(orientation|screenSize|smallestScreenSize|screenLayout) from [:applovin-sdk:] AndroidManifest.xml:17:13-91 is also present at [:com.applovin.applovin-sdk-9.9.1:] AndroidManifest.xml:17:13-59 value=(orientation|screenSize).

Suggestion: add 'tools:replace="android:configChanges"' to element at AndroidManifest.xml:15:9-19:50 to override."

I am not sure where they want me to place this. Any suggestions?

Ok so after 2 days of searching I found the solution - add this to your manifest:

<activity
android:name="com.applovin.adview.AppLovinInterstitialActivity"
android:configChanges="orientation|screenSize"
tools:replace="android:configChanges"
/>

Remember to put the implementation of the SDK to pull in the latest version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM