title: How to use Stripping Level / IL2CPP option in Android Player settings Unity
body: <p>I am trying to reduce size of APK built from Unity. Looking at Android Player Settings <a href="https://docs.unity3d.com/Manual/class-PlayerSettingsAndroid.html" rel="nofollow noreferrer">docs</a>, I fugured out that I can use one of following options to reduce size of build:</p>
  
  <p>Stripping Levels:</p>
  
  <ol>
  <li>Strip Assemblies</li>
  <li>Strip ByteCode (iOS only)</li>
  <li>Use micro mscorlib</li>
  <li>Strip Engine Code (only available when using IL2CPP)</li>
  </ol>
  
  <p>I have following questions regarding this:</p>
  
  <p>In <a href="https://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html" rel="nofollow noreferrer">IOS Build Size Optimization</a> it says: </p>
  
  <blockquote>
    <p><strong>Strip assemblies level</strong>: the scripts’ bytecode is analyzed so that
    classes and methods that are not referenced from the scripts can be
    removed from the DLLs and thereby excluded from the AOT compilation
    phase. This optimization reduces the size of the main binary and
    accompanying DLLs and <strong>is safe as long as no reflection is used</strong>.</p>
  </blockquote>
  
  <p>Does it apply on android as well? </p>
  
  <p>If thats the case, I tried to find referrences of <code>System.Reflection</code> in the whole project (including 3rd party plugins). I could only see usage of reflection in Edior scripts or script under <code>#if UNITY_EDITOR</code>. How can I make sure that stripping won't cause any problem in android build? </p>
  
  <p>Is stripping applied on 3rd party <code>.dll</code> code which is not accessible in Visual Studio/ MonoDevelop?   </p>
  
  <p>Does usage of IL2CPP or stripping level affect performance of the app in any way?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I tried IL2CPP in android project and it added aprox 10MB to build size and took ages to build as well.</p>
  
  <p>Thanks</p>