Disable ART runtime (vmSafeMode) and dex2oat for an Android Library targeting SDK 22+?
<p>So, to properly disable ART runtime, you add <a href="https://developer.android.com/guide/topics/manifest/application-element.html#vmSafeMode" rel="nofollow">android:vmSafeMode="true"</a> to your application's manifest tag.</p>

<p>The issue I am having personally is that I develop an Android Library, and thus I do <em>not</em> have an application tag.</p>

<p>This means that my debugging is <em>extremely slow</em> when using instant run (dex2oat has to run over everything), or when someone using the library is using instant run. </p>

<p>I attempted to use <code>manifestPlaceholders = [vmSafeModeEnabled: "true"]</code> in my build.gradle, however this has no effect. </p>

<p>Anyone have any insights? </p>

<p>Similarly, </p>

<pre><code>dexOptions {
    preDexLibraries false
}
</code></pre>

<p>Yielded no difference in results. I am still seeing dex2oat taking a significant amount of time on each app startup. </p>

<p>Of course, all of these options work fine on applications, but not at all for library/SDK development.</p>