28. June 2017

How to speed up Gradle build in Android Studio

Gradle build should be fast. Even when you build C++ dependencies for Android.

Unfortunately, it often happens that builds take forever and Gradle is not providing any hint how to speed up the build.

One of the most common reasons is that Gradle is trying to download many dependencies. This will take some time even on a fast network. If you’re behind proxy it might take forever.

A quick way to improve performance is to switch Gradle to offline mode.

Go to File, Settings.

Search for “work offline”, check Work offline option and click Ok.

Next Gradle sync or build should be at least 10 times faster.

Once you’ve proved that you have this issue, go to Settings and update Proxy configuration which matches your network.

Enjoy faster builds 🙂

If you’re still facing slow builds let me know.

23. June 2017

Online QR code generator

Here is simple web based QR code generator. Type the text and the QR code will auto-update. You can also copy the URL with “q” value and send it as a link to someone.

Enter text:


Let me know if you’d like to have some other features available at http://georgik.rocks/qr/.

17. June 2017

Manual import of activities to Garmin Connect

Garmin is constantly improving Garmin Connect service. I’m happy to update this simple How to thanks to new version of Connect.

The new version of Garmin Connect makes it simple to upload data. Click the small icon with cloud and arrow in upper right corner and choose Import data.

You’ll see screen where you can drag’n’drop multiple files for upload.

Great job Garmin.

4. June 2017

Workaround: Failed to activate the platformio-ide package

PlatformIO was working without any problem, but after several updates, there was following error message:

Failed to activate the platformio-ide package

The bug is also mentioned at GitHub. It seems that the bug has a relation to the default OS shell.

Try following workaround (it worked for my Linux/ZSH):

  • change default shell to Bash
    sudo chsh -s /bin/bash YOUR_LOGIN
    
  • start Platform IO IDE
  • revert the shell back to your favorite
    sudo chsh -s /usr/bin/zsh YOUR_LOGIN
    

This solution worked for me. Let me know whether you have the same experience.

31. May 2017

How to debug C/C++ code in Android Studio

Android Studio has support for debugging Java and also C/C++ code. The problem is that in default configuration the debugger might not work. There is a quick way how to fix the issue.

Go to your application and select Edit Configurations…

Select tab Debugger and change Debug type to value Dual. Press Ok.

Android Studio will check installed packages and in the case of missing debugger it will prompt you to confirm the fix. Just click Yes.

After installation of necessary packages, the debugger will start and you’ll be able to debug even C/C++ code.

  • Where is the fish?

  • Further info

  • Twitter

    Follow @jurajmichalek on twitter.

  • Comments

  • Tags

  • Topics