Symptoms
- My Android build is failing
- I am using both Unity IAP and AdMob.
Cause
Both Unity IAP and AdMob include the in-app-billing-service-aidl.jar, resulting in two copies of the file. The Android build fails since it is unable to resolve the duplication.
Resolution
Delete one of the copies of the file "in-app-billing-service-aidl.jar" from your project and the build should work.
More Information
Comments
1 comment
I am getting an build error after I implemet unity iap. But there is no such file on my project "in-app-billing-service-aidl.jar".
CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/halimozturk/Documents/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity 5.5.2/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -
stderr[
]
stdout[
Warning: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/halimozturk/Dropbox/Unity Projects/Android/Kids Puzzle Game/Temp/StagingArea/android-libraries/GoogleMobileAdsPlugin/AndroidManifest.xml:2] Main manifest has <uses-sdk android:targetSdkVersion='23'> but library uses targetSdkVersion='24'
Warning: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/halimozturk/Dropbox/Unity Projects/Android/Kids Puzzle Game/Temp/StagingArea/android-libraries/GooglePlay/AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='23'> but library uses targetSdkVersion='24'
]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Article is closed for comments.