升级到 Unity 2022 + Vuforia 10.17.0 后构建 Gradle 解析文件 IndexOutOfRangeException 错误

问题描述 投票:0回答:1

升级至: 最新 Unity 2022LTS Vuforia 10.17.0

大楼,我收到此消息:

IndexOutOfRangeException: Index was outside the bounds of the array.
Vuforia.EditorClasses.GradlePropertiesParser+<>c.<FromString>b__3_1 (System.String v) (at <495be959d8de4b98a0b655f3d7e76c85>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (TSource[] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <da2c421c5cee4c5abffcb37d07c3a87c>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <da2c421c5cee4c5abffcb37d07c3a87c>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector) (at <da2c421c5cee4c5abffcb37d07c3a87c>:0)
Vuforia.EditorClasses.GradlePropertiesParser.FromString (System.String content) (at <495be959d8de4b98a0b655f3d7e76c85>:0)
Vuforia.EditorClasses.GradlePropertiesParser.FromFile (System.String path) (at <495be959d8de4b98a0b655f3d7e76c85>:0)
Vuforia.EditorClasses.PostProcessAndroidBuild.ParseGradleProperties (System.String projectPath) (at <495be959d8de4b98a0b655f3d7e76c85>:0)
Vuforia.EditorClasses.PostProcessAndroidBuild.OnPostGenerateGradleAndroidProject (System.String path) (at <495be959d8de4b98a0b655f3d7e76c85>:0)
UnityEditor.Android.PostProcessor.Tasks.ProcessGenerateProjectCallbacks.OnGeneratePlatformProjectPostprocess (System.String path, System.Boolean strict) (at <950249aad035483681d10b4c9c3c20d4>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)

我的gradle文件:

org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
android.enableR8=**MINIFY_WITH_R_EIGHT**
unityStreamingAssets=.unity3d**STREAMING_ASSETS**
**ADDITIONAL_PROPERTIES**
android.enableJetifier=true
android.useAndroidX=true

尝试更改 gradle.properties 文件,但我总是得到相同的结果。

  • 添加/删除结尾文件新行。
  • 删除 STREAMING_ASSETS,以防出现任何解析错误。
vuforia
1个回答
0
投票

我这里也遇到同样的问题

你解决这个问题了吗?

© www.soinside.com 2019 - 2024. All rights reserved.