I'm trying to add mopub. But when I do, the build manifest adds a library tag and then says it doesn't know what it is. If I remove the link, all works fine.
compile('com.mopub:mopub-sdk:4.16.0@aar') {
transitive = true
}
<library android:name="moat-mobile-app-kit" />
Error:(34) unknown element found
Error:E:\Web\Studio\Opus\app\build\intermediates\manifests\full\live\debug\AndroidManifest.xml:34 unknown element found
Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Error:com.android.builder.internal.aapt.AaptException: AAPT2 link failed: Error:Execution failed for task ':app:processLiveDebugResources'. Failed to execute aapt
I experience this issue, after several inspections i can only conclude that manifest merger, includes the line
<library android:name="moat-mobile-app-kit" />
from mopub avid and moat kit,as this is not supported in the new android gradle plugin, your best bet for now will be to disable viewability measurement by editing mopub dependency line as defined below
compile('com.mopub:mopub-sdk:4.17.0@aar') {
transitive = true
exclude module: 'libAvid-mopub' // To exclude AVID
exclude module: 'moat-mobile-app-kit' // To exclude Moat
}
The only solution I have found so far is to use MoPub 4.15.
Edit: MoPub has confirmed the issue and they wouldn't give me an ETA on a fix.
Edit: 4.18 still broken.
Edit: I should mention I am using 4.19 now with Moat still disabled and using the code to remove Moat, but I also have to do that on other ad networks that include Moat as well. So if you are having this issue you might want to look at all your ad network compile lines.
Edit: According to MoPub, this is fixed on 4.20.0 and it seems to work for me.
There is a moat update that seemingly solves the problem. For me this compiles properly:
implementation 'com.mopub:mopub-sdk:4.19.0@aar'
implementation 'com.moat.analytics.mobile.mpub:moat-mobile-app-kit:2.4.1'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With