Issues with Android builds

Fri 11. Feb 2022, 18:32

Hello. Recently we've been encountering some odd errors in the exported Articy code when running an Android build. We're not 100% sure when it started but we believe that it maybe have something to do with upgrading our minimum Android SDK from 29 to 30.
Anyway, the issue is that when we load up the Articy code on an android build we get 1000's of errors, each of which is about a [SerializeField()]. For example, here's some generated code for our Save_Point:

public class Save_Point : FlowFragment, IFlowFragment, IPropertyProvider, IObjectWithFeatureSave_Info
{

[SerializeField()]
private ArticyValueSave_PointTemplate mTemplate = new ArticyValueSave_PointTemplate();

private static Articy.The_Captain_s_Chair.Templates.Save_PointTemplateConstraint mConstraints = new Articy.The_Captain_s_Chair.Templates.Save_PointTemplateConstraint();
.
.
.}

The error message for that is here:
Error: A scripted object (probably Articy.The_Captain_s_Chair.Save_Point?) has a different serialization layout when loading. (Read 336 bytes but expected 340 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

Now, adding the #if around the [SerializeField()] did seem to get rid of that error, but there's 1000's of them and even if we did make 1000's of changes they would just get overwritten on any new export and this seems like some sort of global toggle or something like that. We're also using Unity 2019.4.30f1.
Thanks!
MikeRifRaf
 
Posts: 13
Joined: Tue 8. Oct 2019, 08:06

Re: Issues with Android builds

Fri 11. Feb 2022, 21:24

OK we figured out what it is and it is NOT in fact related to the SDK version. In the android player settings, go to the Player section, make sure it's on Android, then near the bottom there's a setting called "Managed Stripping Level". We had it set to Medium, and when we went to Low it worked out. So just a heads up to anyone who also has this issue.
MikeRifRaf
 
Posts: 13
Joined: Tue 8. Oct 2019, 08:06

Return to Technical Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

Who We Are
Contact Us
Social Links