老师,您好!
Unity移动端入门 - Android那些事 的第31节 发布JAR包我两次都成功了,但任务32:0506-互相调用模式之导出Aar包 总是失败,卡在这里都半个月了。请老师指点迷津
打包时报错如下:
第一个错误:IOException: Failed to Copy File / Directory from 'Temp/StagingArea\android-libraries\testlibrary-debug\classes.jar' to 'Temp/StagingArea\android-libraries\testlibrary-debug\libs\classes.jar': destination path already exists.
UnityEditor.FileUtil.MoveFileOrDirectory (System.String source, System.String dest) (at C:/buildslave/unity/build/artifacts/generated/common/editor/FileUtilBindings.gen.cs:74)
UnityEditor.Android.PostProcessor.Tasks.ProcessAAR.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:271)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
第二个错误:
Error building Player: 2 errors
第三个错误:
Build completed with a result of 'Failed'
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
第四个错误:
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x00207] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:172
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
您好,新版本的话,尝试不替换class.jar,即不对aar包进行处理,直接用试试