[Qt-creator] Deploying to Android device fails
Jochen Becher
jochen_becher at gmx.de
Thu Sep 28 19:18:03 CEST 2017
Hi Vikas,
I downloaded the sdk tools package and replaced the tools directory in
Sdk with the new one. If I run "sdkmanager --list" version 26.0.1 is
shown for tools and when I click on "Start AVD Manager" in Android
device options I get the error message showing version 26.0.1 of the
installed Sdk tools. So I assume I successfully "downgraded".
But I still get the same error message when I deploy the program:
Cannot find the android build step.
Error while building/deploying project HelloWorld1 (kit: Android for
x86 (GCC 4.9, Qt 5.9.0 for Android x86))
When executing step "Deploy to Android device"
And there is nothing like "Project->Android Kits selected->Build
Settings-> Build Android APK", please see attached screen-shot.
Regards, Jochen
Am Donnerstag, den 28.09.2017, 08:27 +0000 schrieb Vikas Pachdha:g
> Hi Jochen,
>
> You need to downgrade your SDK tools to version 26.0.x.
> Unfortunately, the SDK platform parsing is broken with new SDK tools,
> the fix shall be available with QTC 4.4.1
> Just download the SDK tools from the
> developer.android.com/studio/index.html but do not run “sdkmanager
> –update” the update will get the new sdk tools and TOBOMK one cannot
> downgrade the SDK tools.
>
> [“AVD manager UI tool is not available in the installed SDK tools”]
> Google remove the UI tool since SDK tools version 26 so if you are
> keen to use the AVD manger native UI tool then use SDK tools version
> 25.2.5 or less.
>
> ["Deploying Applications to Android Devices" an Ui element "Projects
> >
> Build Android APK > Details" is mentioned. I cannot find it and
> also
> the screenshot of the details looks completely different from
> mine
> which lists "Uninstall previous package", "Reset Default
> Devices",
> "Clean Temporary Libraries Directory on Device" and "Install
> Ministro
> from APK" only.”]
> “Build Android APK” => Project->Android Kits selected->Build
> Settings-> Build Android APK
> “Deploy configuration” => Project->Android Kits selected-
> >Build Settings-> Deploy configuration
>
> When I press the button "Clean Temporary Libraries Directory
> on Device" QtCreator crashes immediately.
> This option is to clear the temp deployment of Qt libraries. Only
> relevant if you used “Deploy Qt libraries to temporary location” from
> “Build Android APK” settings. But it should not crash, seems like a
> bug. It’ll be great if you can send the stack trace.
>
>
> Please note that you can only use Qt 5.6.3 and Qt 5.9 to develop for
> Android as Gradle scripts are no longer part of Android SDK 25.3.0
> and later and to mitigate this the scripts are delivered with the
> aforementioned Qt versions only.
>
> Google has the tendency to screw up the tooling every now and then
> and keeping up with their pace it kind of challenging. I am trying to
> make the setup process easy and change the Android settings interface
> so that download and setting up the android environment is one click
> task. I hope it’s available soon in future QTC releases.
>
> Regards,
> Vikas Pachdha.
>
> On 27.09.17, 21:10, "Qt-creator on behalf of Jochen Becher" <qt-creat
> or-bounces+vikas.pachdha=qt.io at qt-project.org on behalf of jochen_bec
> her at gmx.de> wrote:
>
> Hi,
> I just installed an Android development environment.
> Unfortunately
> deploying an app to Android devices (physical or virtual) fails.
> Here
> are some details:
> 1. Building, deploying and running a simple "Hello World" project
> (including some C++ code) from Android studio works for both
> virtual
> device on emulator with X86 code and physical ARM device
> connected
> via
> USB.
> 2. Installation in QtCreator 4.4.0 looks reasonable: I entered
> JDK
> location (/usr/lib/jvm/java-8-openjdk-amd64), SDK location
> (/home/jochen/Android/Sdk) and NDK location
> (/home/jochen/Android/Sdk/ndk-bundle).
> 12 toolchains were found and two kits created.
> The virtual device is displayed (7_WSVGA_Tablet_API_17).
> Issue 1: AVD Manager cannot be started from QtCreator. Error
> message
> is:
> AVD manager UI tool is not available in the installed SDK tools
> (version 26.1.1). Use the command line tool "avdmanager" for
> advanced
> AVD management.
> This is not a problem because I can use Android Studio to create
> virtual devices and I can start the virtual device from
> QtCreator.
> 3. Building example "calqlatr" works for both Android kits.
> 4. Issue 2: Deploying the example fails:
> Cannot find the android build step.
> Error while building/deploying project calqlatr (kit: Android for
> x86
> GCC 4.9, Qt 5.9.0 for Android x86))
> When executing step "Deploy to Android device"
> (Same error message for ARM kit).
> When I look into Projects / Run Settings the deployment step
> "Deploy
> to
> Android device" exists.
> There is nothing filled into the Run configuration (only empty
> "Custom
> Executable" is shown) but I assume that is correct for Android
> devices,
> isn't it?
> Any hints?
> BTW, is it possible that the QtCreator documentation is wrong? In
> "Deploying Applications to Android Devices" an Ui element
> "Projects >
> Build Android APK > Details" is mentioned. I cannot find it and
> also
> the screenshot of the details looks completely different from
> mine
> which lists "Uninstall previous package", "Reset Default
> Devices",
> "Clean Temporary Libraries Directory on Device" and "Install
> Ministro
> from APK" only.
> Issue 3: When I press the button "Clean Temporary Libraries
> Directory
> on Device" QtCreator crashes immediately.
> Regards, Jochen
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto von ?2017-09-28 19-13-29?.png
Type: image/png
Size: 233119 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20170928/d8a136d5/attachment.png>
More information about the Qt-creator
mailing list