简体   繁体   English

无法建立Android Qt应用程式

[英]Unable to build an Android Qt application

I've installed the QtSDK, Android SDK & NDK on a new computer. 我已经在新计算机上安装了QtSDK,Android SDK和NDK。 I copied my project and didn't load my .pro.user. 我复制了项目,但没有加载.pro.user。

I downloaded API10 SDK, set it in Qt Creator. 我下载了API10 SDK,并在Qt Creator中进行了设置。 The app compiles but I the apk creation fails. 该应用程序可以编译,但是我无法创建apk。 I get the following log: 我得到以下日志:

-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))

How can I fix it? 我该如何解决? I can't use newer API since the device I have (GT-S6500D) has only Android 2.3.6 我使用的设备(GT-S6500D)只有Android 2.3.6,因此我无法使用更新的API

I had to fix my AndroidManifest. 我必须修复我的AndroidManifest。 API10 did not support some of the options. API10不支持某些选项。

See here and here 这里这里

May be related. 可能相关。 On my system the /build-tools/24.0.0-preview was some how installed with the wrong hardware architecture. 在我的系统上,/build-tools/24.0.0-preview是使用错误的硬件体系结构安装的。

Looking where its set, to set it to 23.0.3. 查看其设置位置,将其设置为23.0.3。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM