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
0
Question by trozwadowski · Jan 13, 2018 at 11:09 AM · androiderroril2cppexception

Unity 2017.3 Android IL2CPP ArgumentNullException

Hello, I'm using too many external libraries in my project to check what causes this error and I can't figure out where this error actually comes from. Please help. :) It works fine with Mono, but with IL2CPP this happens:

01-12 15:44:00.330: E/Unity(13561): ArgumentNullException: Value cannot be null.
01-12 15:44:00.330: E/Unity(13561): Parameter name: method
01-12 15:44:00.330: E/Unity(13561):   at System.Dynamic.Utils.ContractUtils.RequiresNotNull (System.Object value, System.String paramName) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.330: E/Unity(13561):   at System.Linq.Expressions.Expression.Call (System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].CreateCustomNoMatchDelegate (System.Reflection.MethodInfo invoke) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].MakeUpdateDelegate () [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].GetUpdateDelegate (T& addr) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T]..ctor (System.Runtime.CompilerServices.CallSiteBinder binder) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.330: E/Unity(13561):   at System.Runtime.CompilerServices.Cal
01-12 15:44:00.340: E/Unity(13561): ArgumentNullException: Value cannot be null.
01-12 15:44:00.340: E/Unity(13561): Parameter name: method
01-12 15:44:00.340: E/Unity(13561):   at System.Dynamic.Utils.ContractUtils.RequiresNotNull (System.Object value, System.String paramName) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.340: E/Unity(13561):   at System.Linq.Expressions.Expression.Call (System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].CreateCustomNoMatchDelegate (System.Reflection.MethodInfo invoke) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].MakeUpdateDelegate () [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T].GetUpdateDelegate (T& addr) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.CallSite`1[T]..ctor (System.Runtime.CompilerServices.CallSiteBinder binder) [0x00000] in <00000000000000000000000000000000>:0 
01-12 15:44:00.340: E/Unity(13561):   at System.Runtime.CompilerServices.Cal

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by trozwadowski · Jan 14, 2018 at 03:54 PM

So it seems that you cannot use dynamic with IL2CPP.

Comment
Add comment · Show 1 · 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 · Jan 16, 2018 at 01:14 PM 0
Share

Yes, IL2CPP is an ahead-of-time compiler only. It does not support dynamic or System.Reflection.Emit.

avatar image
0

Answer by Lobolopez · Jan 15, 2019 at 01:55 PM

@JoshPeterson Is this still true (jan '19)? What's the alternative? This is my situation (ios 12, Unity 2017, il2cpp):

  public static class PortConverter
     {    public static void Convert(float a, int b)
         {
             Debug.Log("called the typed convert");
         }
     }
     public class Porto<T, M>
     {
         T a;
         M b;
         public Porto(T _a, M _b)
         {
             a = _a;        b = _b;
         }
         public void doThat()
         {
             PortConverter.Convert((dynamic)a, (dynamic)b);
         }
     }
     public class lala : MonoBehaviour {
         Porto<float, int>  a = new Porto<float, int>(1.0f,2);
     
         void OnEnable () {
             a.doThat(); 
         }
     }

That fails in what seems like the call to dynamic, is there a way around? Is there support for dynamic in the horizon?

thanks!

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

178 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 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 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

Error Building Android Project 2 Answers

Android build reports "Wrong task initialization" 1 Answer

Android project build is failing 1 Answer

Help with Exception: Error building Player on Android 2 Answers

Connect Andorid Phone and get error 1 Answer


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