0
votes

I'm currently working in a project involving adding microtransaction inside our android mobile game. We are using Unity and their easy to implement service system (Unity IAP). Our project need to run with the Android SDK 23 in order to compile with the plugins we're using.

Now since we added the In-App Purchasing service, Unity need to use the Android SDK 24 to build an APK. It's actually showing me an error that it can't merge the AndroidManifest because of this contradiction. One place we need API 23 and another API 24.

Is there a solution ? Is there a way to download or import a Unity IAP compatible with Android SDK 23 ? If so where and how ?

I can't seem to find anything about this.

Thanks for you help

2
Not exactly sure if this will work but try to download the IAP with the AIPDownloader script from this answer. Make sure to disable AIP first, delete the IAP folder then try this script. It should download IAP in one click. Hopefully, you will get the old version. Let me know.Programmer
I tried installing AIP with the script you mention but it is still not working. Here is an image of the error I'm getting: imgur.com/a/F6rJpAlexandre Blanchet

2 Answers

0
votes

Merely install Android SDK 24 on the build machine and retry with prior settings to fix. Minimum SDK (android:minSdkVersion) for Unity IAP has not changed with v1.11.0, only targetSdkVersion.

The AndroidManifest.xml for GooglePlay now includes a VR extension to help support Daydream purchasing. Buying goods on Daydream, without this extension, will cause uncomfortable flickering for a user. Android SDK 24 includes this new resource definition, and the corresponding dependency hint <uses-sdk android:targetSdkVersion="24"/>, to support a smooth, immersive VR purchasing dialog.

See What is the difference between min SDK version/target SDK version vs. compile SDK version? for more on Target SDK.

See https://forum.unity3d.com/threads/cant-use-iap-on-version-5-5.472094/#post-3079524 for a picture illustrating a shortcut to installing SDK 24, from Unity 5.6 or Unity 2017.1.

0
votes

I installed Android SDK 24 and change my player settings so the Target API is 24, kept minimal API to the lowest possible. Everything's working fine now the game is building an APK.

Thank you all.