0

1.Before I added the appodeal plug in everything was fine, but I also have unity ads and google services installed, so maybe that's part of the problem. I also removed the target sdk version from the manifest because I thought it will help but it didn't. This is the appodeal manifest :

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="27"/>
<application android:allowBackup="true" android:networkSecurityConfig="@xml/network_security_config"
             android:name="androidx.multidex.MultiDexApplication">

    <uses-library android:name="org.apache.http.legacy" android:required="false"/>
</application>

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<!--optional-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<!--optional-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!--optional-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!--optional-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<!--optional-->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
<!--optional-->
<uses-permission android:name="android.permission.VIBRATE"/>
<!--optional-->
[![enter image description here][1]][1]
Krok123567
  • 19
  • 3
  • 1
    Please share your code/manifest as **text** not as image – derHugo Jan 07 '21 at 12:28
  • I added the code as a text – Krok123567 Jan 07 '21 at 16:00
  • i have same problem :com.my.target.mytarget-sdk-5.11.7:] /Users/ykdev/.gradle/caches/transforms-2/files-2.1/5f3c615a5d99a7408283be6012fe93e8/AndroidManifest.xml:15:9-54 Error: Missing 'package' key attribute on element package at [:com.my.target.mytarget-sdk-5.11.7:] AndroidManifest.xml:15:9-54 [:com.my.target.mytarget-sdk-5.11.7:] /Users/ykdev/.gradle/caches/transforms-2/files-2.1/5f3c615a5d99a7408283be6012fe93e8/AndroidManifest.xml Error: Validation failed, exiting – Yunus Jan 29 '21 at 06:33

1 Answers1

0

I had the same error: Missing 'package' key attribute on element package at [:com.my.target.mytarget-sdk-5.11.7:] AndroidManifest.xml:15:9-54. But you posted the wrong manifest. The error is in a generated one, inside the cache folder of grandle.

But here is the fix:

Preparing your Gradle build for Android 11

You need to change classpath 'com.android.tools.build:gradle:3.4.0' to 'com.android.tools.build:gradle:3.4.3' in gradle file. (Unity 2017.4 - Unity 2019.4) You need to change classpath 'com.android.tools.build:gradle:3.6.0' to 'com.android.tools.build:gradle:3.6.4' in gradle file. (Unity 2020.1)

For versions (Unity 2017.4 - Unity 2019.2) you can change gradle version in /Unity/Hub/Editor/UNITY_VERSION/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/mainTemplate.gradle or directly in mainTemplate.gradle in the project.

For versions (Unity 2019.3 - Unity 2020.1) you can change gradle version in /Unity/Hub/Editor/UNITY_VERSION/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/baseProjectTemplate.gradle or directly in baseProjectTemplate.gradle in the project.

This is from the Appodeal Documentation Docs

Jonaswinz
  • 342
  • 4
  • 15