首页 > 解决方案 > 使用 Jenkins 构建 Unity 时无法将项目路径设置为:C:\Program

问题描述

我是 Unity 和 Jenkins 的新手。我想使用 Jenkins 为我的公司项目构建自动构建,但运行构建时出现错误。这是来自 Jenkins 的错误日志:

Building in workspace C:\Program Files (x86)\Jenkins\workspace\Project-Build
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url https://github.com/my-user-account/project.git # timeout=10
Fetching upstream changes from https://github.com/my-user-account/project.git
 > git.exe --version # timeout=10
 > git.exe fetch --tags --progress https://github.com/my-user-account/project.git +refs/heads/*:refs/remotes/origin/*
 > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
 > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
Checking out Revision 16d16a1ab2deb17ec18a4f3ab1b31170b534095b (refs/remotes/origin/master)
 > git.exe config core.sparsecheckout # timeout=10
 > git.exe checkout -f 16d16a1ab2deb17ec18a4f3ab1b31170b534095b
Commit message: "add builder script"
 > git.exe rev-list --no-walk e272f7767978e0af084b8a49e36385f833f7c6a9 # timeout=10
Piping unity Editor.log from D:\KAIGAN
[Project-Build] $ "C:\Program Files\Unity\Editor\Unity.exe" -quit -batchmode -projectPath C:\Program Files (x86)\Jenkins\workspace\Project-Build -executeMethod BuildScript.PerformAndroidBuild -logFile D:\Custom Folder\JENKINS_BUILD\Project

LICENSE SYSTEM [20181224 6:7:44] Next license update check is after 2018-12-24T12:47:08


LICENSE SYSTEM [20181224 6:7:44] 00330-80123-38760-AA904 != 00330-80000-00000-AA766

Built from '2017.3/release' branch; Version is '2017.3.1f1 (fc1d3344e6ea) revision 16522547'; Using compiler version '160040219'
OS: 'Windows 10  (10.0.0) 64bit' Language: 'en' Physical Memory: 8144 MB
BatchMode: 1, IsHumanControllingUs: 0, StartBugReporterOnCrash: 0, Is64bit: 1, IsPro: 0
[Package Manager] Server::Start -- Port 60900 was selected

 COMMAND LINE ARGUMENTS:
C:\Program Files\Unity\Editor\Unity.exe
-quit
-batchmode
-projectPath
C:\Program
Files
(x86)\Jenkins\workspace\Project-Build
-executeMethod
BuildScript.PerformAndroidBuild
-logFile
D:\Custom Folder\JENKINS_BUILD\Project
Couldn't set project path to: C:\Program

(Filename: C:\buildslave\unity\build\Runtime/Utilities/Argv.cpp Line: 226)


Aborting batchmode due to failure:
Couldn't set project path to: C:\Program

FATAL: Unity3d command line execution failed with status 1
Build step 'Invoke Unity3d Editor' marked build as failure
Archiving artifacts
Finished: FAILURE

错误说

无法将项目路径设置为:C:\Program

但我没明白:(

我在我的 Unity 项目中使用这个 buildscipt:Buildscript.cs

我使用免费的 Unity 版本。我使用安装了 jenkins 和 unity 的 Windows 10。请帮我

标签: c#unity3djenkins

解决方案


推荐阅读