Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android Canary 3.0 beta 5 unknown element <library> found

Tags:

android

mopub

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

like image 562
natedogg265 Avatar asked Sep 16 '17 01:09

natedogg265


3 Answers

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
}
like image 162
Distjoy Avatar answered Nov 10 '22 07:11

Distjoy


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.

like image 40
casolorz Avatar answered Nov 10 '22 07:11

casolorz


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'
like image 5
Mate Herber Avatar answered Nov 10 '22 08:11

Mate Herber