6
\$\begingroup\$

I got this error message when trying to build and run for Android.

enter image description here

Error: [Temp/StagingArea/AndroidManifest-main.xml:22, /Users/MNurdin/Documents/unity/TangoMotion/Temp/StagingArea/android-libraries/google-unity-wrapper/AndroidManifest.xml:3] Main manifest has but library uses minSdkVersion='17' UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

Where I can set android:minSdkVersion inside Unity? I'm using Unity5 right now. Please advice.

\$\endgroup\$
6
\$\begingroup\$

There are a couple spots that could be relevant. First off, you can set the Min API Level in Player Settings (click the Player Settings button on the bottom of that screenshot).

But besides that, you can manually provide your own manifest file; it looks like right now you are simply using the manifest that Unity automatically generates if you don't provide one manually. When an Android app is built, Unity puts the generated manifest file in the Temp folder at StagingArea/AndroidManifest.xml; copy that file to manually edit it. Provide one manually by putting it in Plugins/Android/ alongside the plug-in JAR.

\$\endgroup\$
  • \$\begingroup\$ hi can you please explain it in detail. i am also facing the same problem. I am completely new to the facebook connection system \$\endgroup\$ – Manoj Balaji M Apr 6 '16 at 4:35
0
\$\begingroup\$

I have had trouble with this for days, but now my app works well. Doing like below, may help you.

Read this section of the manual, then change **TARGETSDKVERSION** to your desired number in mainTemplate.gradle, such as 22, 23, etc.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.