Skip to content Skip to sidebar Skip to footer

Run 'uninstallall' Gradle Task Before Running Application In Android Studio From Build.gradle

Before running my application I would like to uninstall any instances on the device. Running the task uninstallAll manually does this perfectly. How can I call this command from my

Solution 1:

What you may need is to set defaultTasks:

defaultTasks uninstallAll

or specify appropriate tasks dependencies:

runTaskName.dependsOn(uninstallAll)

Post a Comment for "Run 'uninstallall' Gradle Task Before Running Application In Android Studio From Build.gradle"