首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法构建Android Qt应用程序

无法构建Android Qt应用程序
EN

Stack Overflow用户
提问于 2015-08-05 19:19:34
回答 2查看 1.1K关注 0票数 0

我已经在一台新电脑上安装了QtSDK、Android SDK和NDK。我复制了我的项目并且没有加载我的.pro.user。

我下载了API10软件开发工具包,在Qt Creator中进行设置。该应用程序编译,但我的apk创建失败。我得到以下日志:

代码语言:javascript
复制
-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.1
     [echo] Resolving Build Target for QtApp...
[gettarget] Project Target:   Android 2.3.3
[gettarget] API level:        10
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/marcin/proj/touchcatch/build-TouchCatch-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/bin
    [mkdir] Created dir: /home/marcin/proj/touchcatch/build-TouchCatch-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/bin/res
    [mkdir] Created dir: /home/marcin/proj/touchcatch/build-TouchCatch-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/bin/rsObj
    [mkdir] Created dir: /home/marcin/proj/touchcatch/build-TouchCatch-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/bin/rsLibs
    [mkdir] Created dir: /home/marcin/proj/touchcatch/build-TouchCatch-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/gen
    [mkdir] Created dir: /home/marcin/proj/touchcatch/build-TouchCatch-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/bin/classes
    [mkdir] Created dir: /home/marcin/proj/touchcatch/build-TouchCatch-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for QtApp...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] Found 2 AIDL files.
     [aidl] Compiling 2 AIDL files.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [aapt] /home/marcin/proj/touchcatch/build-TouchCatch-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/bin/AndroidManifest.xml:3: error: No resource identifier found for attribute 'hardwareAccelerated' in package 'android'
     [aapt] 
     [aapt] /home/marcin/proj/touchcatch/build-TouchCatch-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/bin/AndroidManifest.xml:4: error: Error: String types not allowed (at 'configChanges' with value 'orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation').
     [aapt] 

BUILD FAILED
/home/marcin/devel/android-sdk-linux/tools/ant/build.xml:649: The following error occurred while executing this line:
/home/marcin/devel/android-sdk-linux/tools/ant/build.xml:694: null returned: 1

Total time: 0 seconds
Building the android package failed!
  -- For more information, run this command with --verbose.
13:14:10: The process "/home/marcin/devel/Qt5.5.0/5.5/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project TouchCatch (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.5.0))

我怎么才能修复它?我无法使用更新的API,因为我的设备(GT-S6500D)只有Android 2.3.6

EN

回答 2

Stack Overflow用户

发布于 2015-08-06 02:53:17

我得修好我的AndroidManifest。API10不支持某些选项。

请参阅herehere

票数 1
EN

Stack Overflow用户

发布于 2016-06-07 08:48:53

可能是有关联的。在我的系统上,/build-tools/24.0.0-preview是如何在错误的硬件架构上安装的。

查看其设置位置,将其设置为23.0.3。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31831032

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档