问题描述
我正在新的MacOS Sierra
机器上全新安装Commercial Qt
.我正在尝试为android
& iOS
.我可以毫无问题地为iOS构建我的QtApp.
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.
但是在android上,出现以下错误:
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"
我已经从此处下载了最新的ndk r14b
.
I have downloaded latest ndk r14b
from here.
这几天,我已经从此处安装了Android Studio随附的最新SDK.并更新了android sdkmanager
以安装从android-19
到android-25
的所有平台.
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
.
我还安装了最新的JDK 8.我通过构建&测试了android设置从Android Studio运行一个完美运行的android应用.
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与Android的配合很好.发生了什么变化?由于Android的某些结构性变化,我是否应该进行一些调整?
按照建议PathToAndroidStudio/templates复制到PathToAndroidSDK/templates
或PathToAndroidSDK/tools/templates
sdks/42811774#42811774>此处& 此处 似乎还不够.
Copying PathToAndroidStudio/templates
into PathToAndroidSDK/templates
or PathToAndroidSDK/tools/templates
as suggested here & here doesn't seem to be enough.
除了按照其他答案中的建议复制templates
文件夹外,我还应该做什么?
What more should I do apart from copying the templates
folder as suggested in some other answers ?
推荐答案
您正尝试使用Ant构建系统.将其更改为使用基于Gradle的版本或在此处查看:蚂蚁/文件夹突然从Android SDK中丢失. Google删除了吗?
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构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!