Skip to content

Instantly share code, notes, and snippets.

@Aracem
Last active March 22, 2016 14:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Aracem/a2bcdb841d9d2df07c23 to your computer and use it in GitHub Desktop.
Save Aracem/a2bcdb841d9d2df07c23 to your computer and use it in GitHub Desktop.
Speedup Compile time in debug enabling vmSafeMode. USe this Manifest in your debug folder
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2015 Upclose.me All rights reserved.
~
~ 0000000 xx
~ 00000000 xxxx
~ 0000000000 xxl
~ 00000000000000
~ 000000000000
~ 00000000
~
~ U P C L O S E.M E
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.upclose.aether"
android:installLocation="auto">
<!-- You need to set in your gradle file at least targetSdkaVersion=22-->
<application android:vmSafeMode="true"/>
</manifest>
@lgvalle
Copy link

lgvalle commented Mar 24, 2015

Also, you need targetSDKVersion 22

@cesards
Copy link

cesards commented Mar 24, 2015

Good point. People is saying this should be used with:

dexOptions {
    preDexLibraries = false
}

to compile projects in less time than expected

@Aracem
Copy link
Author

Aracem commented Mar 24, 2015

Thanks Cesards, good tip :) 👍

@Sloy
Copy link

Sloy commented Mar 25, 2015

Which task do you use for checking compile time difference? Or do you just use IDE's run command? And what changes do you apply between checks (edit code, resources, restart IDE...)?

@Sloy
Copy link

Sloy commented Mar 26, 2015

@cesards sure? According to this https://plus.google.com/+AndroidDevelopers/posts/ECrb9VQW9XP preDex makes first build slower and subsequent builds faster.

@cesards
Copy link

cesards commented Mar 27, 2015

Well, actually I'm not sure about anything related to Gradle, just saying together works better for me xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment