Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question il2cpp.exe did not run properly!

Discussion in 'Android' started by SharrTZaw, Jul 30, 2021.

  1. SharrTZaw

    SharrTZaw

    Joined:
    Mar 30, 2019
    Posts:
    13
    I use unity 2019.4.7f1 to build my android app. When I build with "Scripting backend : Mono", it built successfully in Editor but the app crash on start when I test on Android phone. When I built with "Scripting backend : IL2CPP", It shows the following error:

    Win32Exception: ApplicationName='C:\Program Files\Unity\Hub\Editor\2019.4.7f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe', CommandLine='--convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.4.7f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.4.7f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.4.7f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.4.7f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="D:/Sharrtz/Private/2.Production/3. Projects/2021A0-MYOEPYA/1. Android/MP(v-1.0)/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="D:/Sharrtz/Private/2.Production/3. Projects/2021A0-MYOEPYA/1. Android/MP(v-1.0)/Temp/StagingArea/Il2Cpp/il2cppOutput" ', CurrentDirectory='D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\assets\bin\Data\Managed', Native error= The requested operation requires elevation.

    System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    System.Diagnostics.Process.Start () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
    UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at <6776482ad98c481c9322bc7e45bcbc33>:0)
    UnityEditor.Utils.Program.Start () (at <6776482ad98c481c9322bc7e45bcbc33>:0)
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <6776482ad98c481c9322bc7e45bcbc33>:0)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <6776482ad98c481c9322bc7e45bcbc33>:0)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at <6776482ad98c481c9322bc7e45bcbc33>:0)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at <6776482ad98c481c9322bc7e45bcbc33>:0)
    UnityEditorInternal.IL2CPPBuilder.Run () (at <6776482ad98c481c9322bc7e45bcbc33>:0)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <6776482ad98c481c9322bc7e45bcbc33>:0)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d265dd4439034d6c9926c590736e62a5>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d265dd4439034d6c9926c590736e62a5>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <d265dd4439034d6c9926c590736e62a5>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <d265dd4439034d6c9926c590736e62a5>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <6776482ad98c481c9322bc7e45bcbc33>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Can anyone help me with this error? I want my app to run on My phone. Thanks!
     
  2. SharrTZaw

    SharrTZaw

    Joined:
    Mar 30, 2019
    Posts:
    13
    Can anyone help me with this error?
     
  3. SharrTZaw

    SharrTZaw

    Joined:
    Mar 30, 2019
    Posts:
    13
    Due To this statement "Native error= The requested operation requires elevation." I close my editor and reopen as an administrator, the error change to this

    Exception: C:\Program Files\Unity\Hub\Editor\2019.4.28f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe did not run properly!

    Failed running "C:\Program Files\Unity\Hub\Editor\2019.4.28f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe" --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.4.28f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.4.28f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.4.7f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.4.28f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="D:/Sharrtz/Private/2.Production/3. Projects/2021A0-MYOEPYA/1. Android/MP(v-1.0)/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="D:/Sharrtz/Private/2.Production/3. Projects/2021A0-MYOEPYA/1. Android/MP(v-1.0)/Temp/StagingArea/Il2Cpp/il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    ObjectFiles: 316 of which compiled: 0
    Total compilation time: 590 milliseconds.
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Hub\Editor\2019.4.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\User\AppData\Local\Temp\tmpE7C1.tmp" -o "D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_FDD63016D447D52A629DD7810B3BD766\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction -llog -rdynamic -fuse-ld=gold.exe

    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:22196: error: undefined reference to 'IsARKitWorldTrackingSessionConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:22196: error: undefined reference to 'IsARKitWorldTrackingSessionConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26302: error: undefined reference to 'StartWorldTrackingSessionWithOptions'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26391: error: undefined reference to 'PauseSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26487: error: undefined reference to 'CapturePixelData'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26433: error: undefined reference to 'GetVideoTextureHandles'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26477: error: undefined reference to 'SetCameraNearFar'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26497: error: undefined reference to 'SessionAddUserAnchor'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26512: error: undefined reference to 'SessionRemoveUserAnchor'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:21226: error: undefined reference to 'GetBlendShapesInfo'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:21226: error: undefined reference to 'GetBlendShapesInfo'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:21951: error: undefined reference to 'IsARKitFaceTrackingConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:21951: error: undefined reference to 'IsARKitFaceTrackingConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:22068: error: undefined reference to 'IsARKitSessionConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:22068: error: undefined reference to 'IsARKitSessionConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:22196: error: undefined reference to 'IsARKitWorldTrackingSessionConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26401: error: undefined reference to 'HitTest'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26414: error: undefined reference to 'GetLastHitTestResult'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26321: error: undefined reference to 'StartSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26170: error: undefined reference to 'unity_CreateNativeARSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26201: error: undefined reference to 'session_SetSessionCallbacks'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26223: error: undefined reference to 'session_SetPlaneAnchorCallbacks'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26245: error: undefined reference to 'session_SetUserAnchorCallbacks'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26267: error: undefined reference to 'session_SetFaceAnchorCallbacks'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26283: error: undefined reference to 'StartWorldTrackingSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26302: error: undefined reference to 'StartWorldTrackingSessionWithOptions'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26321: error: undefined reference to 'StartSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26340: error: undefined reference to 'StartSessionWithOptions'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26359: error: undefined reference to 'StartFaceTrackingSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26378: error: undefined reference to 'StartFaceTrackingSessionWithOptions'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26391: error: undefined reference to 'PauseSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26401: error: undefined reference to 'HitTest'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26414: error: undefined reference to 'GetLastHitTestResult'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26433: error: undefined reference to 'GetVideoTextureHandles'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26444: error: undefined reference to 'GetAmbientIntensity'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26455: error: undefined reference to 'GetTrackingQuality'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26466: error: undefined reference to 'GetARPointCloud'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26477: error: undefined reference to 'SetCameraNearFar'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26487: error: undefined reference to 'CapturePixelData'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26497: error: undefined reference to 'SessionAddUserAnchor'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26512: error: undefined reference to 'SessionRemoveUserAnchor'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26170: error: undefined reference to 'unity_CreateNativeARSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26466: error: undefined reference to 'GetARPointCloud'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26283: error: undefined reference to 'StartWorldTrackingSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26340: error: undefined reference to 'StartSessionWithOptions'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26378: error: undefined reference to 'StartFaceTrackingSessionWithOptions'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26359: error: undefined reference to 'StartFaceTrackingSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26444: error: undefined reference to 'GetAmbientIntensity'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26455: error: undefined reference to 'GetTrackingQuality'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:21951: error: undefined reference to 'IsARKitFaceTrackingConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:22068: error: undefined reference to 'IsARKitSessionConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:22196: error: undefined reference to 'IsARKitWorldTrackingSessionConfigurationSupported'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies)
    at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Hub\Editor\2019.4.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\User\AppData\Local\Temp\tmpE7C1.tmp" -o "D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_FDD63016D447D52A629DD7810B3BD766\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction -llog -rdynamic -fuse-ld=gold.exe

    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:22196: error: undefined reference to 'IsARKitWorldTrackingSessionConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:22196: error: undefined reference to 'IsARKitWorldTrackingSessionConfigurationSupported'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26302: error: undefined reference to 'StartWorldTrackingSessionWithOptions'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26391: error: undefined reference to 'PauseSession'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26487: error: undefined reference to 'CapturePixelData'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26433: error: undefined reference to 'GetVideoTextureHandles'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26477: error: undefined reference to 'SetCameraNearFar'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp10.cpp:26497: error: undefined reference to 'SessionAddUserAnchor'
    D:\Sharrtz\Private\2.Production\3. Projects\2021A0-MYOEPYA\1. Android\MP(v-1.0)\Temp\StagingArea\<message truncated>
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Check "undefined reference to" errors, they specify functions which implementations are missing on Android, either provide the implementation or don't perform the call on Android
     
  5. SharrTZaw

    SharrTZaw

    Joined:
    Mar 30, 2019
    Posts:
    13
    Thanks Tomas, I found out that I imported a package that include "using UnityEngine.XR.iOS;". Now I remove all the associated files and built successfully in editor with IL2CPP . But when I test it on my phone, it start with black screen and crash When I tough to screen.
     
  6. SharrTZaw

    SharrTZaw

    Joined:
    Mar 30, 2019
    Posts:
    13
    I am soory I forgot to add my custom Main.gradle and gradle.properties file because I am using Google cardboard xr plugin. When I add them and rebuilt, it show the following error:

    > Task :launcher:preBuild UP-TO-DATE
    > Task :unityLibrary:preBuild UP-TO-DATE
    > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:checkReleaseManifest UP-TO-DATE
    > Task :launcher:prepareLintJar UP-TO-DATE
    > Task :unityLibrary:processReleaseManifest
    > Task :launcher:preReleaseBuild FAILED
    4 actionable tasks: 2 executed, 2 up-to-date


    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

    FAILURE: Build failed with an exception.


    * What went wrong:
    Execution failed for task ':launcher:preReleaseBuild'.
    > Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
    > Failed to transform artifact 'support-v4-25.1.0.aar :)support-v4-25.1.0:)' to match attributes {artifactType=android-manifest}
    > Execution failed for JetifyTransform: D:\Sharrtz\Private\2.Production\3. Projects\2021A0


    CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Java\jdk1.8.0_261\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.4.28f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    stderr[
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

    Build completed with a result of 'Failed' in 308 seconds (307516 ms)
    UnityEngine.GUIUtility:processEvent (int,intptr)

    UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bf] in <bd70c40e01f641bdb7d836e1e97755bc>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <bd70c40e01f641bdb7d836e1e97755bc>:0
    UnityEngine.GUIUtility:processEvent (int,intptr)
     
  7. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Get https://docs.unity3d.com/Packages/com.unity.mobile.android-logcat@1.2/manual/index.html if you haven't yet, enable Development checkbox, and investigate the log from android device, it might hint you of what went wrong
     
  8. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    No clue about this error, try googling, there's probably a conflict in gradle files.
     
  9. SharrTZaw

    SharrTZaw

    Joined:
    Mar 30, 2019
    Posts:
    13
    Thank for your reply, Thomas. I browse a lot for this problems and finally solved.

    I delete all the plugins in Mapbox/Core/Plugin/Android/ except "libcore-release.aar", "okhttp-3.8.0.jar" and "okio-1.13.0.jar" and export the project and build in android studio.It works for me.
     
    Tomas1856 likes this.