- Home /
Cannot build for android with facebook sdk -- Unity 5.4.0f3
I tried to build my project for android with the latest Unity 5.4.0f3. After I import the newest Facebook Unity SDK, it cannot be built anymore and throws this error :
Failed to compile resources with the following parameters: -bootclasspath "/Users/jing/Library/Android/sdk/platforms/android-24/android.jar" -d "/Users/jing/Documents/Git/HexCrash/HexCrash/Temp/StagingArea/bin/classes" -source 1.6 -target 1.6 -encoding UTF-8 "android/support/v4/R.java" "android/support/v7/cardview/R.java" "com/Studio23rd/HexCrush/R.java" "com/facebook/R.java" "com/facebook/android/R.java" warning: /Users/jing/Library/Android/sdk/platforms/android-24/android.jar(java/lang/Object.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. warning: /Users/jing/Library/Android/sdk/platforms/android-24/android.jar(java/lang/AutoCloseable.class): major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded. 2 warnings
UnityEditor.HostView:OnGUI()
I know this one must be some conflicts among android native jar files but have no idea how to fix it. Does anyone know how to fix this?
Answer by etliaojing · Aug 09, 2016 at 04:20 PM
I just solved the problem myself. I updated my android sdk and jdk to the latest ones (25.1.7 and 8u102), and after this, build, made it.
Hope this can help someone~