简体   繁体   English

Facebook Unity sdk错误

[英]Facebook Unity sdk error

I'm getting this error when compiling unity for android using the facebook unity sdk (if I remove the sdk it compiles fine): 我在使用facebook unity sdk为android编译统一时遇到此错误(如果我删除它编译好的sdk):

Failed to compile resources with the following parameters:
-bootclasspath "/Users/ines/Development/android-sdk-macosx/platforms/android-21/android.jar" -d "/Users/ines/Documents/Game/Temp/StagingArea/bin/classes" -source 1.6 -target 1.6 -encoding UTF-8 "com/RPS/Game/R.java" "com/facebook/android/R.java"
warning: java/lang/Object.class(java/lang:Object.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
1 warning

UnityEditor.HostView:OnGUI()

I cannot understand why this is happening. 我不明白为什么会这样。 I'm running Unity 4.6 on OSX 10.9.5 and I have the latest version of Java installed as well as the android skd. 我在OSX 10.9.5上运行Unity 4.6,我安装了最新版本的Java以及android skd。

Can anyone help me? 谁能帮我?

I am getting identical error since yesterday and after spent whole morning to research. 我从昨天开始和整个上午花在研究之后得到了同样的错误。 I found that it is cause by the latest Android API version 21. After I revert back to Android API version 20 by deleting all the API version 21 packages in SDK manager and everything back to normal. 我发现它是由最新的Android API版本21引起的。之后我通过删除SDK管理器中的所有API版本21软件包恢复到Android API版本20,一切恢复正常。 Hope it helps. 希望能帮助到你。

The solution for this can be found here: http://answers.unity3d.com/questions/814186/error-when-compiling-android.html 可以在此处找到解决方案: http//answers.unity3d.com/questions/814186/error-when-compiling-android.html

You can try by the terminal itself. 你可以尝试终端本身。 Or if something weird happens, as was my case, try manually. 或者,如果出现奇怪的事情,就像我的情况一样,请手动尝试。

I've had the same issue and have tried all the suggestions that have already been made here without success. 我遇到了同样的问题,并尝试了所有已经在这里取得成功的建议。

What ended up working for me was to delete the "adt-bundle/sdk/platforms/android-21" folder and only leave the "android-20" folder in my case. 最终为我工作的是删除“adt-bundle / sdk / platforms / android-21”文件夹,只保留“android-20”文件夹。 Check the Android SDK folder you're targeting in your Unity preferences. 检查您在Unity偏好设置中定位的Android SDK文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM