问题描述
我正在一台新的 MacOS Sierra
机器上全新安装 Commercial Qt
.我正在尝试为 android
& 构建一个示例 Qt 应用程序iOS
.我可以毫无困难地为 iOS 构建我的 QtApp.
但在 android 上我收到以下错误:
Buildfile: build.xml 不存在!构建失败构建android包失败!-- 有关更多信息,请使用 --verbose 运行此命令.19:47:50:进程/Users/MyComputer/Qt/5.7/android_armv7/bin/androiddeployqt"退出,代码为14.构建/部署项目 t1 时出错(套件:Android for armeabi-v7a (GCC 4.9, Qt 5.7.1))执行步骤构建 Android APK"时
我已经从
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?
这篇关于在 OSX 机器上为 Android 新设置的 Qt 构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!