Reputation: 131
For my application I have to test my application on three devices. Everytime I want to upload my code to all devices, gradle builds the application again for every device which takes a very long time.
Is there a way to make gradle understand nothing has changed in the code and it should just upload the same code to the other device?
I've searched on google and stack exchange sites but couldn't find a conclusive answer. I've also searched the gradle settings file but couldn't find anything that would solve my problem.
Upvotes: 0
Views: 499
Reputation: 33408
Upgrade your Android Studio to V2.0+ and make use of the Instant Run feature to avoid rebuilding for every change.
If you are already on a version of android studio above 2.0 enable instant run from
Settings - > Build, Execution, Deployment > Instant Run
Introduced in Android Studio 2.0, Instant Run is a behavior for the Run and Debug commands that significantly reduces the time between updates to your app. Although your first build may take longer to complete, Instant Run pushes subsequent updates to your app without building a new APK, so changes are visible much more quickly.
Read official documentation to learn about the benefits of instatn run in detail.
Upvotes: 2