Freshly setup Qt build for Android fails on OSX machine

心已入冬 提交于 2019-11-28 12:41:26

问题


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 ?


回答1:


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?



来源:https://stackoverflow.com/questions/43398966/freshly-setup-qt-build-for-android-fails-on-osx-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!