Android studio tips and tricks

Hi Android developers, today I will be writing about some interesting tips to work smartly on Android studio. Android studio comes with loads of features but perhaps it creates trouble in certain cases, so lets discuss about those issues and their fixes. Here we go –

  • Android studio on very slow internet speed

    Studio starts hanging if you will work on very slow internet due to the gradle building process during opening of project, building it or rebuilding etc. And it will be troublesome to work in such scenario, to avoid such kind of scenarios Android studio has given an option to work on offline mode . To enable offline mode follow these steps –

    Android studio

    offline work

    •  Click on File menu
    • Select Settings option
    • Select “Build, Execution, Deployment” from left side panel of the dialog
    • Now select the “Build Tools” sub option from left side panel
    • Select “Gradle” option again from the left side panel
    • Now you all can see “offline work” checkbox in the right side panel, so just select it.
    • And click on “Apply” and then “Ok” and you are done

Read also – 

  • Run Android studio on low battery in your laptop

    Android studio

    Power save mode

     

    Due to increasing usage of laptops, notepads, think-pads their is a problem comes for Android developers to run Android studio to work during low battery or in situations when battery usage matters. So Android studio has the solution to this problem too, you just have to enable the “power save mode” from File. So during this mode code analysis and background tasks will not run which will reduce the CPU usage.

  • Give presentations from Android studio

    Android studio

    Presentation mode

    After completing any module or any experimental work, we use to give presentations about the work to the managers, colleagues during that time we face problems to show this in projectors but not in case of Android studio. Android studio already solved this issue by giving option to change the current mode to presentation mode and it will be ready for presentation and again after presentation you have to exit from the same place. This is really cool feature I found here during one of the presentation times, I recommend to leverage this feature to all of you.

  • View all breakpoints and remove them all

During the process of app development most of the time we use to debug by putting breakpoints, but we forget to remove them often times. Breakpoints will not create any problem unless we debug any class or method which will not call another method with breakpoints which actually increase our debugging efforts. But we can reduce this effort by simply removing all or selected breakpoints from the project by pressing “CTLR+Shift+f8” . It open a dialog with all the breakpoints which we can remove there or even we can add in advance from here.

 

I hope these tips to use Android studio will help you all and I do like to hear from you all. Sooner I will come up with more such tips.

 

Happy coding!!!

Leave a Reply

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