Unity Build-异常:il2cpp.exe无法正常运行

时间:2019-11-26 23:50:41

标签: android unity3d gradle android-ndk il2cpp

使用Unity 2017.4.34f1(LTS) IL2CPP NDK r13b ,我尝试将Unity Project导出到Android Project(过程)。

注意:我之所以使用IL2CPP,是因为Google PlayStore希望同时使用32位和64位,因此我不能再使用 Mono 作为脚本后端

但是,它失败了,并且出现了以下错误:

Exception: C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.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:272)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

和另一个错误日志:

Failed running C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --development-mode --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\zukinaru\Desktop\orisnowyndo\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\zukinaru\Desktop\orisnowyndo\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/android-ndk-r13b-windows-x86_64/android-ndk-r13b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp-firstpass.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\DOTween.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.Settings.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\PlayMaker.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\TextMeshPro-1.0.55.2017.1.0b12.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Analytics.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.Android.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.Canvas.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.IOS.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\mscorlib.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Stores.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Purchasing.dll" --generatedcppdir="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput" 

stdout:
Building libil2cpp.so with AndroidToolChain.
    Output directory: C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
ObjectFiles: 691 of which compiled: 282
    Time Compile: 54396 milliseconds Il2CppAttributes.cpp
    Time Compile: 23198 milliseconds Bulk_TextMeshPro-1.0.55.2017.1.0b12_0.cpp
    Time Compile: 21138 milliseconds Il2CppInvokerTable.cpp
    Time Compile: 20951 milliseconds Bulk_mscorlib_16.cpp
    Time Compile: 16387 milliseconds Bulk_Assembly-CSharp_19.cpp
    Time Compile: 15667 milliseconds Bulk_mscorlib_17.cpp
    Time Compile: 13478 milliseconds GenericMethods24.cpp
    Time Compile: 13394 milliseconds Il2CppMetadataUsage.cpp
    Time Compile: 13278 milliseconds Bulk_Mad2D_0.cpp
    Time Compile: 12015 milliseconds Bulk_mscorlib_10.cpp
Total compilation time: 765251 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\zukinaru\AppData\Local\Temp\tmp56A5.tmp" -o "C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-16\arch-arm" -gcc-toolchain "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.map" -rdynamic -fPIE -pie -fuse-ld=bfd.exe

clang++.exe: warning: argument unused during compilation: '-pie'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_init_m2214171880':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:543: undefined reference to `init'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logout_m2238411584':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_activateApp_m160690348':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logPurchase_m2329488507':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:605: undefined reference to `logPurchase'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_ui_m1731210125':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:635: undefined reference to `ui'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_initScreenPosition_m891649343':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext)
   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
   at il2cpp.Program.DoRun(String[] args)
   at il2cpp.Program.Run(String[] args)
   at il2cpp.Program.Main(String[] args)
stderr:

Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\zukinaru\AppData\Local\Temp\tmp56A5.tmp" -o "C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-16\arch-arm" -gcc-toolchain "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.map" -rdynamic -fPIE -pie -fuse-ld=bfd.exe

clang++.exe: warning: argument unused during compilation: '-pie'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_init_m2214171880':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:543: undefined reference to `init'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logout_m2238411584':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_activateApp_m160690348':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logPurchase_m2329488507':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:605: undefined reference to `logPurchase'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_ui_m1731210125':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:635: undefined reference to `ui'
C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_initScreenPosition_m891649343':
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext)
   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
   at il2cpp.Program.DoRun(String[] args)
   at il2cpp.Program.Run(String[] args)
   at il2cpp.Program.Main(String[] args)

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

到目前为止我所做的事情:

1)尝试使用 NDK r16b ,但失败,因为Unity 2017.4只需要 NDK r13b

2)以管理员身份运行Unity,但仍然无法解决

3 个答案:

答案 0 :(得分:2)

我刚刚遇到了这个问题,并且相信我已经找到了解决此潜在IL2CPP构建问题的解决方案之一。我在下面以粗体显示了解决方法。以下是我发现的内容。我的问题是由于以下错误:

    stdout:
Building build.bc with EmscriptenToolChain
    Output directory: D:\xxxx\Unity\Projects\01_2d_projects\SiteEstablish\Temp\StagingArea\Data\Native
    Cache directory: D:\xxxx\Unity\Projects\01_2d_projects\SiteEstablish\Library\il2cpp_cache
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException:   File "C:\Users\xxxxxxx\AppData\Local\Programs\Python\Python37-32\Lib\site.py", line 177
    file=sys.stderr)
    ^

SyntaxError:语法无效enter image description here

我非常有预感,没有理由应该运行该文件,并且只能想到一个可能来自“环境变量”的区域。该路径位于“ PATH”下,为“%PYTHONPATH%”,它将是到该目录的唯一失败连接。即使将这些项目从“环境变量”中删除,该路径仍然会受到影响。我最终将Python目录移动到另一个位置,然后将平台从Windows切换回WebGL,然后成功了。这可能无需删除目录文件就可以实现,但是我不知道Unity构建行为是如何工作的。我试图重新创建该问题,但是构建仍然成功。所以,我所能做的就是希望对您有所帮助。

半解决方案(请注意以下事项。如果从系统变量中删除路径,则可能会很糟糕!):

在错误中,您将需要在“路径”系统变量中找到目录路径,并将其删除。在下面,您可能会类似于“ C:\ Users \ zukinaru \ Desktop \”,并且可能会更详细:

标准输出: 使用AndroidToolChain构建libil2cpp.so。 输出目录: C:\ Users \ zukinaru \ Desktop \ orisnowyndo \ Temp \ StagingArea \ assets \ bin \ Data \ Native \ armeabi-v7a 缓存目录: C:\ Users \ zukinaru \ Desktop \ orisnowyndo \ Library \ il2cpp_android_armeabi-v7a \ il2cpp_cache

就像我的图像一样,找到系统上的“ Path”变量,然后删除路径(保存所做的操作,以便以后可以将其放回去)。单击“确定”,直到全部保存。从任何平台切换回“ WebGL”。我相信IL2CPP中的小型应用程序可能是从这些系统变量中提取的,并且以这种方式弄乱了构建。我相信这就是我在那里看到此问题的原因,但是由于每个人的路径变量设置在pc到pc上都不一样,因此错误略有减少。

答案 1 :(得分:0)

似乎您可能会使用为更高版本的Unity开发的Facebook插件。
要确认这一点,请使用一个空项目+ Facebook(或您要测试的其他插件)并进行构建,看看是否发生错误。

答案 2 :(得分:0)

将您的脚本运行时更改为 Mono 而不是 IL2CPP,这可能会解决您的问题。