我在Unity项目中加入了Fabric和Crashlytics,我正在尝试为Android构建。我得到的信息是:
Failed to compile resources with the following parameters:
-bootclasspath "/Users/mihai.stan/Library/Android/sdk/platforms/android-24/android.jar" -d "/Users/mihai.stan/Dev/SideScroller/Temp/StagingArea/bin/classes" -source 1.6 -target 1.6 -encoding UTF-8 "com/tagonsoft/spaceattack/R.java" "io/fabric/answers/android/unity/R.java" "io/fabric/beta/android/unity/R.java" "io/fabric/crashlytics/android/unity/R.java" "io/fabric/sdk/android/unity/R.java" "io/fabric/unity/android/R.java" "io/fabric/unity/crashlytics/android/R.java"
warning: /Users/mihai.stan/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/mihai.stan/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()
和
UnityException: Resource compilation failed!
Failed to recompile android resource files. See the Console for details.
UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message, System.Exception ex)
UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message)
UnityEditor.Android.PostProcessAndroidPlayer.CompileResources (System.String stagingArea, System.String packageName, UnityEditor.Android.AndroidLibraries androidLibraries)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.AndroidBuild
Postprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
UnityEditor.HostView:OnGUI()
和
Error building Player: UnityException: Resource compilation failed!
Failed to recompile android resource files. See the Console for details.
请记住,我已经更新了jkd和jre以及Android Studio。 有关如何解决它的任何提示?
答案 0 :(得分:0)
我设法解决了这个问题。我已经更新了jdk,但是Unity没有自动检测到新路径,所以我必须手动完成。一切都按预期工作。