Unity detect wrong androidSDK version
I'm developing a multiplayer game with Unity 5 + PlayFab and I want to integrate Facebook plugins. However, after importing Facebook SDK package and I try to build my game to apk file, I get this error.
Error: [Temp\StagingArea\AndroidManifest-main.xml:2, D:\Documents\[CPE403] Senior Project 2\ParticleShot 15 Mar2016 15.02\ParticleShot 20160316 14.26 Win-Lose\Temp\StagingArea\android-libraries\facebook-android-sdk-4.9.0\AndroidManifest.xml:3] Main manifest has <uses-sdk android:minSdkVersion='10'> but library uses minSdkVersion='15'
This still happen although I've already set the minimum API level in the setting to Android 4.0.3 (API Level 15).
And after I edited the AndroidManifest.xml manually, I get this error instead.
CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:\Program Files\Java\jdk1.8.0_31\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:\Users\ThePriefy\AppData\Local\Android\android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoJellyBeanMr2;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatJellyBeanMr2;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorCompatHelper;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorListenerCompat;
...
How can I solve this problem, thanks!
I have a very similar problem with the Facebook SD$$anonymous$$ v4.7.0.
I'm pretty sure it's because of a duplicate library jar file somewhere, but I have no idea how to find it or remove it.
After I tried a lot of solutions, I delete 2 files, support-v4 and support-v7 in Assets\Plugins\Android and it works! (Link to this solution: https://community.playfab.com/hc/en-us/community/posts/208179628-JAR-conflict-with-Unity-Android)
$$anonymous$$aybe you might find the solution in other tools board that you integrated to your game.
Wish this helps. :)
Your answer
Follow this Question
Related Questions
Android build problem 0 Answers
Error while saving blame file 6 Answers
Play Store AdMob permissions 0 Answers
Unable to convert classes into dex format 12 Answers