用android SDK无法编译项目

时间:2017-11-01 20:16:10

标签: android unity3d compiler-errors unity-container android-sdk-tools

我正在尝试为Android尝试各种版本的android sdk并没有什么。 我尝试使用api版本24,25和21 for android 5和7但没有编译。 我很沮丧。 任何想法?

enter image description here

error1 : 无法使用以下参数编译资源: -bootclasspath" C:/ Users / user / AppData / Local / Android / sdk \ platforms \ android-24 \ android.jar" -d" C:\ Users \ user \ Desktop \ Location-Based-Markerless-Augmented-Reality-master \ Temp \ StagingArea \ bin \ classes" -source 1.6 -target 1.6 -encoding UTF-8" com \ unity3d \ player \ R.java" " EU \九段\ androidar \ R.java" " EU \九段\ AR \ R.java" 警告:[options]源值1.6已过时,将在以后的版本中删除 警告:[options]目标值1.6已过时,将在以后的版本中删除 警告:[options]要禁止有关过时选项的警告,请使用-Xlint:-options。 3警告

UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)

误差2 UnityException:资源编译失败! 无法重新编译android资源文件。请参阅控制台了解详细信息 UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild(System.String title,System.String message,System.Exception ex) UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild(System.String title,System.String message) UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuildPointToConsole(System.String title,System.String message) UnityEditor.Android.PostProcessor.Tasks.BuildResources.CompileResources(UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.Tasks.BuildResources.Execute(UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTask​​s(UnityEditor.Android.PostProcessor.PostProcessorContext context) 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 .BuildReporting.BuildReport报告) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess(BuildPostProcessArgs args) UnityEditor.PostprocessBuildPlayer.Postprocess(BuildTargetGroup targetGroup,BuildTarget target,System.String installPath,System.String companyName,System.String productName,Int32 width,Int32 height,BuildOptions options,UnityEditor.RuntimeClassRegistry usedClassRegistry,UnityEditor.BuildReporting.BuildReport report)(at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:271) UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)

误差3: UnityEditor.BuildPlayerWindow + BuildMethodException:4个错误   at UnityEditor.BuildPlayerWindow + DefaultBuildMethods.BuildPlayer(BuildPlayerOptions options)[0x00207]在C:\ buildslave \ unity \ build \ Editor \ Mono \ BuildPlayerWindowBuildMethods.cs:172   at UnityEditor.BuildPlayerWindow.CallBuildMethods(布尔值askForBuildLocation,BuildOptions defaultBuildOptions)[0x00050]在C:\ buildslave \ unity \ build \ Editor \ Mono \ BuildPlayerWindowBuildMethods.cs:83 UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)

1 个答案:

答案 0 :(得分:0)

您必须安装Java和Android Studio,然后检查Unity中不同的SDK路径是否正确: 编辑>偏好>外部工具

在我的情况下,默认路径可以正常工作: SDK:C:/ Users / NAME / AppData / Local / Android / sdk JDK:C:/ Program Files / Android / Android Studio / jre NDk:C:/ NVPACK / android-ndk-r10e

在您的路径中使用“/”代替“\”。

希望有所帮助。