- Home /
Gradle error minsdk in manifest please help
manifest file of assets>plugins>Android
PLEASE HELP
Answer by mkieling · Jul 06, 2021 at 04:36 PM
Same problem here. I have:
Removed all elements from all AndroidManifest.xml files in my project tree and added to my main manifest at /Assest/Plugins/AndroidManifest.xml the following line:
<meta-data android:name="uses-sdk" tools:node="remove" />
I see logs in the output as follows:
/Users/mark/dev/unity/MyProject/Temp/gradleOut/unityLibrary/src/main/AndroidManifest.xml:4:3-60 Warning:
meta-data#uses-sdk was tagged at AndroidManifest.xml:4 to remove other declarations but no other declaration present.
Yet I still get the following - GRADLE ERROR : minsdk-in-manifest
Fixed - turns out that after removing the uses-sdk node from the manifest. One must quit and restart unity. :/
Answer by -chris · Jul 10, 2021 at 08:46 AM
In Unity, search your Project tab for
AndroidManifest
.If any file contains
<uses-sdk android:minSdkVersion="XX" />
, use a text editor to remove the element (or comment it out), then save the file.Try building again.
For me, the GooglePlayGames plugin had an AndroidManifest.xml file with the above element that was causing the issue.
Thank you for your response. As I said above, I searched the whole project tree and removed them. I still get the error and I suspect that gradle is pulling in a package or plugin that has in a manifest that gets merged into $$anonymous$$e.