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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

IL2CPP switch from Mono for Google Play Store

Discussion in 'Editor & General Support' started by d20kev, Dec 17, 2019.

  1. d20kev

    d20kev

    Joined:
    Jul 19, 2019
    Posts:
    16
    I switched to IL2CPP for android store, build went fine, Google published it, but when i try to open it, it just says app stopped running before even going to the splash screen. When i go into unity to "build and run" on my galaxy 9+, i get this console error;

    InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread
    UnityEngine.Object.EnsureRunningOnMainThread () (at <dd7258062d3a4670ac6a983c4a6697a5>:0)
    UnityEngine.Object.GetInstanceID () (at <dd7258062d3a4670ac6a983c4a6697a5>:0)
    UnityEngine.Object.IsNativeObjectAlive (UnityEngine.Object o) (at <dd7258062d3a4670ac6a983c4a6697a5>:0)
    UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs) (at <dd7258062d3a4670ac6a983c4a6697a5>:0)
    UnityEngine.Object.op_Inequality (UnityEngine.Object x, UnityEngine.Object y) (at <dd7258062d3a4670ac6a983c4a6697a5>:0)
    UnityEngine.Events.PersistentCall.ValidateTargetAssemblyType () (at <dd7258062d3a4670ac6a983c4a6697a5>:0)
    UnityEngine.Events.PersistentCall.OnAfterDeserialize () (at <dd7258062d3a4670ac6a983c4a6697a5>:0)

    ive tried the following:

    1.) Created a new keystore, and signed
    2.) <application android:allowBackup="false" />
    3.) disabled strip engine code.
    4.) last resort, updated to 2020.1.0a16
    5.) Tried download from store on several different android devices, same issue.

    Still won't build to my device, and i seem to have a game in the store that wont open when installed...any ideas? I'm at a loss here.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The first thing I'd to is revert my project back to the state where you successfully created your last successful build and see if you have the same issue, using the same Unity version you were previously using. I'd also try just building instead of "build and run".
     
  3. d20kev

    d20kev

    Joined:
    Jul 19, 2019
    Posts:
    16
    i did try that, and build works, which is what i submitted to the play store, but now when I, and my beta testers download from the store, the app crashing instantly before the unity splash screen.