请帮助!
我正在尝试为我拥有的游戏(Android)构建APK。我已经尝试了Build和Build and Run,但没有一个适合我。
当我使用“生成”时,我遇到了两个问题。第一个问题是,它说构建成功了,而没有/没有任何构建/ APK。第二个问题是,我对此了解不多。在下面。
构建完成,结果为“成功” UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)
尽管它说由于成功完成了构建,但这是错误的。我的意思是根本没有构建。它生成的文件夹中没有APK。我尝试更改文件夹,但仍然无法使用。
UriFormatException:URI方案必须以字母开头并且必须为 由字母,数字,“ +”,“-”或“。”之一组成字符。...
System.Uri.Parse(UriKind类型,System.String uriString) System.Uri.ParseUri(UriKind类)System.Uri..ctor(System.String uriString,布尔值dontEscape)System.Uri..ctor(System.String uriString)System.Xml.XmlResolver.ResolveUri(System.Uri baseUri, System.String relativeUri)System.Xml.XmlUrlResolver.ResolveUri (System.Uri baseUri,System.String relativeUri) Mono.Xml2.XmlTextReader.GetStreamFromUrl(System.String url, System.String&absoluteUriString)Mono.Xml2.XmlTextReader..ctor (System.String url,System.Xml.XmlNameTable nt) System.Xml.XmlTextReader..ctor(System.String网址, System.Xml.XmlNameTable nt)System.Xml.XmlTextReader..ctor (System.String url)UnityEditor.AndroidXmlDocument..ctor (System.String路径) UnityEditor.Android.PostProcessor.Tasks.PrepareAPKResources.PatchStringsXml ()UnityEditor.Android.PostProcessor.Tasks.PrepareAPKResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext上下文) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext上下文) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess(BuildTarget 目标,System.String stagingAreaData,System.String stagingArea, System.String playerPackage,System.String installPath,System.String companyName,System.String productName,BuildOptions选项, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport报告) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args,UnityEditor.BuildProperties& outProperties)UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup,BuildTarget目标,System.String installPath,System.String companyName,System.String productName, Int32宽度,Int32高度,BuildOptions选项, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport报告)(在 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:285) UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)**
但是, 当我使用“构建并运行”时,出现以下4个错误。
UriFormatException:URI方案必须以字母开头,并且必须由字母,数字,'+','-'或'组成。字符。... System.Uri.Parse(UriKind类型,System.String uriString) System.Uri.ParseUri(UriKind类)System.Uri..ctor(System.String uriString,布尔值dontEscape)System.Uri..ctor(System.String uriString)System.Xml.XmlResolver.ResolveUri(System.Uri baseUri, System.String relativeUri)System.Xml.XmlUrlResolver.ResolveUri (System.Uri baseUri,System.String relativeUri) Mono.Xml2.XmlTextReader.GetStreamFromUrl(System.String url, System.String&absoluteUriString)Mono.Xml2.XmlTextReader..ctor (System.String url,System.Xml.XmlNameTable nt) System.Xml.XmlTextReader..ctor(System.String网址, System.Xml.XmlNameTable nt)System.Xml.XmlTextReader..ctor (System.String url)UnityEditor.AndroidXmlDocument..ctor (System.String路径) UnityEditor.Android.PostProcessor.Tasks.PrepareAPKResources.PatchStringsXml ()UnityEditor.Android.PostProcessor.Tasks.PrepareAPKResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext上下文) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext上下文) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess(BuildTarget 目标,System.String stagingAreaData,System.String stagingArea, System.String playerPackage,System.String installPath,System.String companyName,System.String productName,BuildOptions选项, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport报告) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args,UnityEditor.BuildProperties& outProperties)UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup,BuildTarget目标,System.String installPath,System.String companyName,System.String productName, Int32宽度,Int32高度,BuildOptions选项, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport报告)(在 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:285) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
构建播放器时出错:2个错误
构建完成,结果为“失败” UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
UnityEditor.BuildPlayerWindow + BuildMethodException:3个错误 ...,位于UnityEditor.BuildPlayerWindow + DefaultBuildMethods.BuildPlayer (BuildPlayerOptions选项)中的[0x0021f] /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:182 在UnityEditor.BuildPlayerWindow.CallBuildMethods(布尔 askForBuildLocation,BuildOptions defaultBuildOptions)[0x00065]在 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:89 UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
感谢您的帮助,谢谢!
答案 0 :(得分:0)
请尝试检查您的文件夹中是否有包含'/'字符的名称。如果是这样,请关闭Unity,从文件夹名称中删除“ /”,然后重新启动Unity。
由于错误尝试失败,文件夹名称只能包含“字母,数字,'+','-'或'。字符”。
来源:https://forum.unity.com/threads/uriformatexception.106996/
希望这会有所帮助!