Unrecognized Attribute name MODULE when building .AAB with AdMob


I built my game as an .aab for upload at Play Store Console, The website warned me that I had to add a Privacy Policy because of a READ_PHONE_STATE permission. I don’t intend on making use of any device data, maybe a library in the game does but I’m not sure, After googling around I found out this may be due to a bug in the AdMob package 12.0.0 (even though I confirmed my version is 20.0.0):


An answer in the same page suggests a workaround adding the following lines to AndroidManifest.

<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" ... >
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />

After editing the AndrodiManifest file I get the following error when I try to build:

unrecognized Attribute name MODULE

After googling around further, I found some leads and tried to change unity JDK to 11 but that just brought up different errors.


I’d like to know if someone has some insight on whats going on there or some advice on how to proceed from here, I’m about to publish the game and this issue is a big annoyance.

I can reproduce the steps to get the error logs if someone thinks that might help.

Besides that, I’d like to know where I can learn more about formatting the questions here at UA, I simply can’t manage to break lines properly.

Wandering there is no response to this ???

I am facing the same with my working project today in 2018.4.30f1, this is a all of a sudden error. Everything was working fine a few days ago.

I was targetting API 30 and it was the highest installed in the SDK Manager. But there was a folder android-31 in the SDK/platforms folder. I deleted that and made a build again and the error was gone.