Skip to main content

Android 11 Support

Unity: All versions | Appodeal SDK: All versions

The error Missing 'package' key attribute on element package during the build for different packages inside Appodeal SDK (MyTarget, Facebook, Yandex, etc. ) occurs if the Gradle version is not compatible with new default settings and features for package visibility in Android 11 and doesn't matches the one of listed here.

The error log examples from Unity Editor Log:

-Missing 'package' key attribute on element package at [] AndroidManifest.xml:12:9-55
-[] C:\Users\User\.gradle\caches\transforms-2\files-2.1\90ae6591b63c7214a4618c0480fa9104\AndroidManifest.xml Error:
-Validation failed, exiting
-Execution failed for task ':launcher:processReleaseManifest'.

Missing 'name' key attribute on element provider at [] AndroidManifest.xml:26:9-28:54
[] C:\Users\User\.gradle\caches\transforms-2\files-2.1\5940db64a8e232109b21ef62c4b41386\jetified-mobmetricalib-3.20.1\AndroidManifest.xml Error:
Validation failed, exiting

To fix it change your Gradle version to match the one of listed here:

  1. Go to Player Settings → Publishing Settings and enable Custom Base Gradle Template flag.

  2. Go to Assets → Plugins → Android → baseProjectTemplate.gradle, open the file and change classpath '' to ''.

    If you have already been using gradle plugin 4.0.1 version or higher, no change is required.