Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Softnauts · Aug 12, 2017 at 07:55 AM · android buildil2cpp

Unity 2017.1 IL2CPP for Android "UnityLinker.exe did not run properly!"

Hi! I have got a problem with compilation for il2cpp. What is strange that il2cpp works for IOS, but not for Android. Posting below error info: Failed running /Applications/Unity/Unity.app/Contents/il2cpp/build/UnityLinker.exe --api=NET_2_0 -out="/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/tempStrip" -l=none -c=link --link-symbols -x="/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Core.xml" -f="/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/../platform_native_link.xml" -x "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/methods_pointedto_by_uievents.xml" -x "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/preserved_derived_types.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/AI.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Animation.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Audio.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Cloth.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Core.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/CrashReporting.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Director.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/GameCenter.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/IMGUI.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/ImageConversion.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Input.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/JSONSerialize.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/ParticleSystem.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/ParticlesLegacy.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/PerformanceReporting.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Physics.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Physics2D.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/ScreenCapture.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/SpriteMask.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/StyleSheets.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Terrain.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/TerrainPhysics.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/TextRendering.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/UI.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/UIElements.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/UNET.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/UnityAnalytics.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/UnityConnect.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/UnityWebRequest.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/UnityWebRequestAudio.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/UnityWebRequestTexture.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/UnityWebRequestWWW.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/VR.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Vehicles.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Video.xml" -x "/Applications/Unity/PlaybackEngines/AndroidPlayer/Whitelists/Web.xml" -x "/Users/patryksladek/etabuunity/Assets/link.xml" -x "/Users/patryksladek/etabuunity/Assets/FacebookSDK/link.xml" -x "/Users/patryksladek/etabuunity/Assets/Scripts/link.xml" -d "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed" -a "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/Assembly-CSharp.dll" -a "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.Advertisements.dll" -a "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.UI.dll" -a "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.Analytics.dll" -a "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/DOTween.dll" -a "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/Facebook.Unity.dll" -a "/Users/patryksladek/etabuunity/Temp/StagingArea/assets/bin/Data/Managed/TextMeshPro-1.0.55.2017.1.0b11.dll"

stdout: Fatal error in Unity CIL Linker System.NullReferenceException: Object reference not set to an instance of an object at Mono.Linker.Utilities+c_Iterator1.MoveNext () [0x00039] in :0 at Mono.Linker.Steps.TypeMapStep.TryMatchMethod (Mono.Cecil.TypeReference type, Mono.Cecil.MethodDefinition method) [0x00034] in :0 at Mono.Linker.Steps.TypeMapStep+c_Iterator0.MoveNext () [0x00069] in :0 at Mono.Linker.Steps.TypeMapStep.MapVirtualInterfaceMethod (Mono.Cecil.MethodDefinition method) [0x00022] in :0 at Mono.Linker.Steps.TypeMapStep.MapVirtualMethod (Mono.Cecil.MethodDefinition method) [0x00008] in :0 at Mono.Linker.Steps.TypeMapStep.MapVirtualMethods (Mono.Cecil.TypeDefinition type) [0x0003c] in :0 at Mono.Linker.Steps.TypeMapStep.MapType (Mono.Cecil.TypeDefinition type) [0x00001] in :0 at Mono.Linker.Steps.TypeMapStep.ProcessAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00020] in :0 at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00031] in :0 at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00025] in :0 at UnityLinker.UnityDriver.Run () [0x00087] in :0 at UnityLinker.UnityDriver.RunDriverWithoutErrorHandling () [0x00001] in :0 at UnityLinker.UnityDriver.RunDriver () [0x00002] in :0 stderr:

UnityEngine.Debug:LogError(Object) UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128) UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:89) UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:82) UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:200) UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:114) UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34) UnityEditor.HostView:OnGUI() Thanks for your help!

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JoshPeterson · Aug 22, 2017 at 12:00 PM 0
Share

This looks like a bug in Unity. Can you submit a bug report?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by hpidcock · Nov 14, 2017 at 04:53 AM

Took a while for me to debug this in our project. (Building with 2017.2.0f3 64bit on Windows targeting Android)

If a call to UnityEngine.iOS.Device.SetNoBackupFlag for example is present on Android in any assembly, it will cause il2cpp's UnityLinker to crash. Even if a call never happens at runtime.

Since UnityEngine.dll is a monolithic assembly that provides functionality for all platforms, it shouldn't result in compilation/build pipeline errors when you have a call to platform specific functionality. If a call exists to one of these platform specific methods, the method should be stubbed out and throw a not implemented exception.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JoshPeterson · Nov 14, 2017 at 12:31 PM 0
Share

Your description of what should happen is correct. This looks like a bug in UnityLinker. Can you submit a bug report and include a project that causes this issue?

avatar image hpidcock JoshPeterson · Nov 14, 2017 at 11:53 PM 0
Share

Submitted.

avatar image $$anonymous$$ hpidcock · May 14, 2020 at 10:03 AM 0
Share

Hello there, I'm trying to build .aab file for Android, but I cannot because of UnityLinker.exe error. I use Unity 2019.3 il2cpp and net.x.4. Could you please help me)

Show more comments
avatar image
0

Answer by Only4gamers · Jun 30, 2020 at 12:46 PM

Did you find the solution? I am facing similar issue.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

70 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Android build crash - stack corruption detected Unity 2018.3.8f1 2 Answers

Has anyone downloaded and loaded .so files manually with any soLoader, to reduce the apk size? 0 Answers

Error while building APK (IL2CPP)- Failed to link 'libunity.so'. 0 Answers

Can not build to Android with backend Il2cpp 2 Answers

Error during building native library with il2cpp 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges