Facebook Unity SDK 错误

7

在使用Facebook Unity SDK编译Unity安卓应用时,出现了以下错误(如果我移除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()

我不明白为什么会出现这种情况。我在OSX 10.9.5上运行Unity 4.6,并安装了最新版本的Java和Android SDK。

有人能帮帮我吗?


你能修好这个问题吗? - hemanth kumar
3个回答

0

自昨天起,我一直遇到相同的错误,并花了整个早上进行研究。我发现这是由于最新的Android API版本21引起的。在SDK管理器中删除所有API版本21包后,我回退到Android API版本20,一切恢复正常。希望能对你有所帮助。


0

0

我曾经遇到过同样的问题,并尝试了这里提出的所有建议,但都没有成功。

最终对我有用的方法是删除“adt-bundle/sdk/platforms/android-21”文件夹,只保留“android-20”文件夹。请检查您在Unity首选项中针对的Android SDK文件夹。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接