Set-up Qt for Android dev on Ubuntu
Brief explanation on how to set up your development environment to develop Android apps on Ubuntu using Qt.
Installing and configuring Qt
- Download and install the latest Qt.
- Install necessary extra packages for Qt:
- For 64-bit machines:
sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
- For the emulator:
sudo apt-get install libsdl1.2debian:i386
- For 64-bit machines:
Android dev environment
- Download the latest Android SDK and uncompress it.
- Edit your ~/.bashrc file by adding these line at the end:
export PATH=$PATH:/path/to/android-sdk-linux/platform-tools:/path/to/android-sdk-linux/tools
- You should logout and login again to update the PATH variable.
- In a terminal, run
android
and install the suggested packages. - Download the latest NDK, and execute it:
chmod +x android-ndk-version.bin && ./android-ndk-version.bin
- Install
ant
from repositories:sudo apt-get install ant
- Install java development kit (in this example openjdk):
sudo apt-get install openjdk-7-jdk
.
Debugging
The instructions are for debugging on physical devices.
- Set up your device for debugging (just the Enabling On-device Developer Options section)
- To make sure you don't deal with permissions, you can start your
adb server
as root mode. For this, go to path/to/android-sdk/platform-tools and run./adb kill-server && sudo ./adb start-server
- Plug-in your mobile device, authorize it and test your environment following this tutorial.
Written by Mariano Finochietto
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Android
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#