Unsolved Unable to Deploy Android Application
-
I think you might be missing ANT or Gradle. You can configure it just below the settings for the Android SDK and NDK. You can download ANT here: http://ant.apache.org/bindownload.cgi .
-
Thanks Dino, Ant was already installed and found by Qt Creator. However, I ran 'ant.bat' in a command line window, and it did complain that it can't find 'tools.jar' in the expected location. I fixed the Java path and now Ant runs OK, but Qt still shows up the same error.
-
Your system is x86 or x64?
If it is x86 then that is the problem and you should download platform tools version 23 for your sdk. -
Nick, if by system you mean the operating system, than it is x64. The platform-tools version is 24.0.3.
-
Please also check that the Android SDK Build-Tools are installed. They are listed in the Android SDK Manger -> Tools.
-
Yes, I have Android SDK Build-Tools 24.0.2 installed.
-
@Shahar-Klinger
You can also download sdk and ndk tools from Android SDK tool kit and Android NDK tool kit -
You should download from sdk manager the google usb driver also.
-
Thanks Nick, it's already installed.
Maybe can someone give me a list of required components for Qt? I have a feeling I'm missing something there, as there are many options.
-
@Shahar-Klinger Did you check this introduction: http://doc.qt.io/qt-5/androidgs.html
-
@jsulm Yes, that was one of the first docs I read. One line that troubles me is "2. Select the components you need in the Select Components screen and click Next.".
Maybe I didn't install all the required components, or there is some problem with those I selected?
-
@Shahar-Klinger Which components did you install?
-
The Qt components I installed, as listed in the Maintenance Tool, are as follows:
Qt 5.7.0:
- msvc2013 64-bit
- Android x86
- Android ARMv7
- Other Qt components (Charts, Data Visualization etc.)
Tools:
- MinGW 5.3.0
Thanks!
-
So I just had a breakthrough, that resulted in the application showing up on my phone.
After building the project in Qt, I go to the build directory in a command line prompt, and type:mingw32-make install INSTALL_ROOT=.\Deploy androiddeployqt --output .\Deploy --install --input android-libcalqlatr.so-deployment-settings.json
And lo and behold, the application is installed on the device.
Why doesn't Qt Creator do this automatically?