ylliX - Online Advertising Network
Android Studio's "I'm Feeling Lucky" Button

Android Studio’s “I’m Feeling Lucky” Button



30 Nov 2022

1 min read

Android Studio has a misleading “Make project” button that you shouldn’t click.

Android Studio (and by extension – IntelliJ) has this hammer icon button in the IDE.

It’s the “Make/Build Project” action and it’s a trap!

This button runs every assemble task in your project, including tests, applications, and subprojects that may have nothing to do with the subproject you’re currently working on.

If you have anything less than a nontrivial repo, this can often lead to surprisingly long and wasteful builds without realizing it when just iterating on a specific feature or API.

Stick to the Run button to run your specific Run Configuration (the DenyListedApiDetectorTest.rxjava hide functions box in the above screenshot) or focus the desired file/project and hit Build > Make Module “<your focused module here>”.

Because many folks don’t realize this (especially junior developers) and that icon is so enticing for a build-but-don’t-run option, we’ve had to quite literally add a check in our root build file to fail the build if more than 25 tasks were requested because we just assume they must have clicked this icon.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *