统一的aapt.exe错误

时间:2018-03-09 16:17:17

标签: unity3d facebook-unity-sdk

我想将facebook SDK我的项目添加到Unity上,当我添加SDK时,它给出了错误“build-tools / aapt.exe”我在google上搜索了这个,所以很多人说在build-tools文件夹中删除,所以我删除了build-tools文件夹,但现在给出了错误,如下所示

Win32Exception: ApplicationName='C:/Users/Muhammet/AppData/Local/Android/Sdk\platform-tools\aapt.exe', CommandLine='package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "C:/Users/Muhammet/AppData/Local/Android/Sdk\platforms\android-27\android.jar" -F bin/resources.ap_ --extra-packages com.facebook.android:com.facebook.applinks:com.facebook.common:com.facebook.core:com.facebook.login:com.facebook.messenger:com.facebook.places:com.facebook.share -S "C:\Users\Muhammet\Desktop\unity_Projeler\test3d1\test2d\Temp\StagingArea\android-libraries\facebook-android-wrapper-7.11.0\res" -S "C:\Users\Muhammet\Desktop\unity_Projeler\test3d1\test2d\Temp\StagingArea\android-libraries\facebook-applinks\res" -S "C:\Users\Muhammet\Desktop\unity_Projeler\test3d1\test2d\Temp\StagingArea\android-libraries\facebook-common\res" -S "C:\Users\Muhammet\Desktop\unity_Projeler\test3d1\test2d\Temp\StagingArea\android-libraries\facebook-core\res" -S "C:\Users\Muhammet\Desktop\unity_Projeler\test3d1\test2d\Temp\StagingArea\android-libraries\facebook-login\res" -S "C:\Users\Muhammet\Desktop\unity_Projeler\test3d1\test2d\Temp\StagingArea\android-libraries\facebook-messenger\res" -S "C:\Users\Muhammet\Desktop\unity_Projeler\test3d1\test2d\Temp\StagingArea\android-libraries\facebook-places\res" -S "C:\Users\Muhammet\Desktop\unity_Projeler\test3d1\test2d\Temp\StagingArea\android-libraries\facebook-share\res"', CurrentDirectory='Temp/StagingArea'
System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
System.Diagnostics.Process.Start ()
(wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:44)
UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:28)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg)
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.RunAllTasks (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 report)
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:263)
UnityEditor.HostView:OnGUI()

我应该为这个问题做些什么?

1 个答案:

答案 0 :(得分:0)

This error can be cause due to many things. 
1) Update JDK
2) Check Java Path.
3) Update Android SDK
4) Delete duplicate .jar file in unity asset folder under plugins folder. 
5) Check target version in AndroidManifest.xml and Player Settings which should be same. 
6) If these doesn’t work. Your error is causing “Android-27”. So go to androidskd > build-tools and remove the folder android-27 folder and build again.