When I tried to build QtFireExample with my QtCreator, failed with below error message.
The installed SDK tools version (26.1.1) does not include Gradle
scripts. The minimum Qt version required for Gradle build to work is
5.9.0/5.6.3 Error while building/deploying project QtFirebaseExample (kit: Android) When executing step "Build Android APK"
My android studio is 3.2.1. And SDK tools 26.1 is also installed.
qt version is also above 5.9.0
What I did mistake?
❯ qmake --version
QMake version 3.1
Using Qt version 5.12.0 in /usr/local/Cellar/qt/5.12.0/lib
There's more steps to follow before you can deploy your first Android app using QtCreator. Installing SDK tools is not enough. Here is what I did, I'm using Windows, but hopefully the steps are the same under Ubuntu.
Install QtCreator using the link provided by Hitokage, include QtCreator (I got version 4.8.0), and Qt 5.12.0 binaries for your platform + needed Android (armv7, x86...)
Get JDK 1.8.X.X
Get NDK r18b (or a more recent version)
Get SDK tools 26.1.1 (what you already did)
SDK tools itself is not enough, some SDK modules must be installed, from SDK tools folder, run:
sdkmanager platform-tools
sdkmanager build-tools;28.0.3
sdkmanager extras;google;usb_driver
sdkmanager platforms;android-22 (which is enough for me, you may want something different based on your target Android devices)
Then open QtCreator, Go to "Mobile devices" (my french version calls it "Appareils mobiles"), then make it point to installed JDK, SDK, NDK, clic Apply and then kits should be automtically created. Now you are ready to compile and deploy and Android app for API 22.
Note that gradle is automatically downloaded by QtCreator first time you'll request a deployment.
I have tried downgrading the SDK Tools which didn't work. What worked for me however was downloading the official QT installer (working on Linux), installed QT to a new directory along with ARM64-v8a and ARMv7 (which probably solved the problem, I didn't have that in the package I installed from Arch repo). Now I can (after allowing the developer and debug mode on the device) deploy the app on the phone.
EDIT: Then chose one of those auto-detected kits.
Related
I have installed:
Qt 5.14.1 for msvc 2017 & Android installed to c:\Qt\Qt5.14.1\:
Compilers available in Qt Creator:
Kits available:
JDK-13.0.2 installed to c:\Program Files\Java\jdk-13.0.2
Android Studio 3.6.1 g:\Android\Android Studio\ with SDKs installed to g:\Android\SDK as shown below:
SDK tools:
Now what I see in Qt Creator:
How can I fix these errors? Why did they arise?
Edit: I've installed JDK 8 instead of 13. But still have the same red crosses.
Also in the topic 'Platform SDK installed' red X Adding Android SDK Tools in Qt Creator says that SDK 25.2.5 has to be installed, but how can I install SDK 25.2.5 ? Android Studio doesn't have this version available in the System Settings.
Edit 2: I've downloaded the archive "Android SDK Tools 25.2.5" from the link https://androidsdkmanager.azurewebsites.net/SDKTools . As I understand, this archive contains "SDK tools 25.2.5" + "some Android package manager". Then I:
Unpack the archive to the folder g:\Android\SDK\tools\. What the folder actually contains:
ant\
apps\
bin\
lib\
lib64\
proguard\
qemu\
support\
templates\
android.bat
ddms.bat
draw9patch.bat
hierarchyviewer.bat
jobb.bat
lint.bat
monitor.bat
monkeyrunner.bat
traceview.bat
uiautomatorviewer.bat
emulator.exe
emulator-arm.exe
emulator-check.exe
emulator-crash-service.exe
emulator-mips.exe
emulator-x86.exe
emulator64-crash-service.exe
mksdcard.exe
source.properties
NOTICE.txt
package.xml
Run android.bat from the folder and in the window that appears, I see that now I have SDK 25.2.5 installed:
And in Qt Creator Android Settings are almost ok now:
You can check these links that may help you. Although, its looks like the problem is the JDK version, you should test with JDK 8, instead the latest release.
https://wiki.qt.io/Qt_for_Android_known_issues
https://forum.qt.io/topic/90310/platform-sdk-installed-red-x-adding-android-sdk-tools-in-qt-creator/20
After updating Android Studio to 2.0 l am getting this error unable to obtain debug bridge and Android Device Monitor does not open. Anyone faced this error before?
I just open sdk manager and installed all android sdk tools and done.
Check whether you need to install "Android Sdk Platform Tools" in the Android SDK Manager.
Somehow, after installing Android Studio from the bundle (for Linux) I lacked the "platform-tools" directory in "Android/Sdk", where the adb executable resides. Installing the platform tools helped. It was easier to find in the standalone sdk manager.
This is because you deleted the adb.exe (it might be your antivirus who deleted it),that resided in the platform tools in the android sdk folder.
What you need to do is to delete the current platform-tools in the sdk manager program and re install it all over again.
I installed the right sdk version that matched my virtual device android version
I am also running the same problem when update android studio from 1.4 to 1.5 stable version. When I run adb command from terminal then i found following error :
bash: ./adb: cannot execute binary file: Exec format error
After R&d I found that this error occurs due to unsupported architecture. In my case:
I am using ubuntu14.04 LTS 32-bit. I observed that after updation, lib folder under platform-tools converted to lib64. I think above error occurs due to 32-bit architecture because after updation 32-bit support removed.
For permanent solution upgrade you system to 64-bit architecture.
Quick solution is to replace the updated platform-tools folder with old one that containing the lib folder instead of lib64.
I think 32-bit architecture support for android development stopped by google for future releases. But I am not sure.
I am phase these error when updating Android-SDK Plateform-Tools 23.1 in Android SDK Manager
i am worked on ubuntu 14.04 [32bit] that is not supporting with Plateform-Tools 23.1 it is only supporting in 64bit Operating System architecture that's why downgrade my Plateform-tools 23.0
it works perfect...!!!
Go to: Android Studio Settings > Appearance & Behavior > System Settings > Android SDK:
If path for SDK are text in red, change to your SDK folder and click ***APPLY***
Open the standalone SDK manager and install the platform tools package.
What is a working combination of versions of the development tools if I want to develop C++ Qt Android apps? I tried several combinations but they all fail with strange build errors of a simple Hello World test app.
Currently, I have
Qt Creator 4.2.1 (based on Qt 5.8.0, MSVC 2015, 32bit)
JDK 10.0.1
Android SDK 24.4.1-win
Android NDK r10e
Apache ant 1.9.11
but e.g. that fails with
Buildfile: build.xml does not exist!
Build failed
Warning: Android platform 'android--1' does not exist in SDK.
Building the android package failed!
-- For more information, run this command with --verbose.
21:35:44: Der Prozess "C:\EigeneDateien\bin\Qt-5.8.0\5.8\android_armv7\bin\androiddeployqt.exe" wurde mit dem Rückgabewert 14 beendet.
I want to use an open source version.
Please, give a list of tools with correct version numbers and maybe download links.
The good procedure is to use Qt's online installer (https://www.qt.io/download-qt-installer), get the latest version of QtCreator/Qt, then the latest version of ndk/sdk/jdk and cross your fingers because it does not always work...
I fighted a bt with this in early 2019 and here is a combination that perfectly works for me since then, under Windows 7 and 10.
QtCreator 4.8.0, based on Qt 5.12.0. I got it from the online installer by then and archived it, but you can apparently specifically download it from here.
NDK r18b
JDK 1.8.0_201, can be dowaloaded from this page (find jdk-8u201-windows-x64.exe)
Android SDK command line tools "sdk-tools-windows-4333796", available here. Then used sdkmanager to download API platform-tools and android-28. Try sdkmanager "platform-tools" "platforms;android-28"
No need for ant anymore, QtCreator will download and use gradle silently.
I am doing a fresh installation of Commercial Qt on a new MacOS Sierra machine. I am trying to build a sample Qt app for android & iOS. I am able to build my QtApp for iOS without any trouble.
But on android I get the following error:
Buildfile: build.xml does not exist!
Build failed
Building the android package failed!
-- For more information, run this command with --verbose.
19:47:50: The process "/Users/MyComputer/Qt/5.7/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project t1 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.1))
When executing step "Build Android APK"
I have downloaded latest ndk r14b from here.
I have installed latest sdk that comes with Android Studio these days from here. And updated android sdkmanager to installed all platforms ranging from android-19 to android-25.
I have installed latest JDK 8 as well. I tested the android setup by building & running an android app from Android Studio which worked flawlessly.
Qt worked with Android pretty nicely. What has changed ? Should I do some tweaks because of some structural changes in Android ?
Copying PathToAndroidStudio/templates into PathToAndroidSDK/templates or PathToAndroidSDK/tools/templates as suggested here & here doesn't seem to be enough.
What more should I do apart from copying the templates folder as suggested in some other answers ?
You are trying to use Ant build system. Change it to using Gradle-based one or take a look here: The ant/ folder is suddenly missing from Android SDK. Did Google remove it?
After updating Android Studio to 2.0 l am getting this error unable to obtain debug bridge and Android Device Monitor does not open. Anyone faced this error before?
I just open sdk manager and installed all android sdk tools and done.
Check whether you need to install "Android Sdk Platform Tools" in the Android SDK Manager.
Somehow, after installing Android Studio from the bundle (for Linux) I lacked the "platform-tools" directory in "Android/Sdk", where the adb executable resides. Installing the platform tools helped. It was easier to find in the standalone sdk manager.
This is because you deleted the adb.exe (it might be your antivirus who deleted it),that resided in the platform tools in the android sdk folder.
What you need to do is to delete the current platform-tools in the sdk manager program and re install it all over again.
I installed the right sdk version that matched my virtual device android version
I am also running the same problem when update android studio from 1.4 to 1.5 stable version. When I run adb command from terminal then i found following error :
bash: ./adb: cannot execute binary file: Exec format error
After R&d I found that this error occurs due to unsupported architecture. In my case:
I am using ubuntu14.04 LTS 32-bit. I observed that after updation, lib folder under platform-tools converted to lib64. I think above error occurs due to 32-bit architecture because after updation 32-bit support removed.
For permanent solution upgrade you system to 64-bit architecture.
Quick solution is to replace the updated platform-tools folder with old one that containing the lib folder instead of lib64.
I think 32-bit architecture support for android development stopped by google for future releases. But I am not sure.
I am phase these error when updating Android-SDK Plateform-Tools 23.1 in Android SDK Manager
i am worked on ubuntu 14.04 [32bit] that is not supporting with Plateform-Tools 23.1 it is only supporting in 64bit Operating System architecture that's why downgrade my Plateform-tools 23.0
it works perfect...!!!
Go to: Android Studio Settings > Appearance & Behavior > System Settings > Android SDK:
If path for SDK are text in red, change to your SDK folder and click ***APPLY***
Open the standalone SDK manager and install the platform tools package.