无法编译资源

时间:2017-01-16 08:59:26

标签: java android unity3d google-play-services

在我添加了从官方github repo下载的Play商店服务包后,当我尝试在Unity 5.5.0f3中编译Android时收到此错误消息。

Failed to compile resources with the following parameters:
-bootclasspath "C:/Users/Riccardo/AppData/Local/Android/sdk\platforms\android-25\android.jar" -d "D:\Develop\Unity Projects\OxS Tennis Game Mobile\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "android\support\v4\R.java" "com\google\android\gms\R.java" "com\google\android\gms\auth\R.java" "com\google\android\gms\auth\api\R.java" "com\google\android\gms\base\R.java" "com\google\android\gms\drive\R.java" "com\google\android\gms\games\R.java" "com\google\android\gms\nearby\R.java" "com\google\android\gms\tasks\R.java" "com\google\example\games\mainlibproj\R.java" "com\IgnisTenebrisStudio\Hellball\R.java" "com\unity3d\ads\R.java"
warning: C:\Users\Riccardo\AppData\Local\Android\sdk\platforms\android-25\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: C:\Users\Riccardo\AppData\Local\Android\sdk\platforms\android-25\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()

我也有JAVA_HOME和Path设置(Win 10 os)。

我的案例中的JAVA_HOME是C:\Program Files\Java\jdk1.7.0_79

在路径中我有C:\Program Files\Java\jdk1.7.0_79\bin

有人可以帮帮我吗? 我应该尝试更新到jdk1.8吗?

1 个答案:

答案 0 :(得分:2)

好的,我找到了解决方案。

我更新到jdk 1.8_111并更新了所有系统路径。现在Unity正在编译我的项目。