生成失败,出现QT / android-armv7中的异常

时间:2019-07-29 12:33:43

标签: android qt android-studio qt-creator

我无法在qt / android中构建armv7。在Qt或Android Studio中需要在哪里设置?

这是针对Qt 5.12.2的,编译器是适用于armeabi-v7a和Android Studio(sdk和ndk-bundle)的Android

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.2'
    defaultConfig {
        applicationId "com.smewise.camera2"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    testImplementation 'junit:junit:4.13-beta-3'
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
}

构建日志:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugAidl'.
> java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\cansunurk\AppData\Local\Android\Sdk\build-tools\29.0.0\aidl.exe with arguments {-pC:\Users\cansunurk\AppData\Local\Android\Sdk\platforms\android-28\framework.aidl -oC:\Users\cansunurk\Documents\build-denemee-Android_for_armeabi_v7a_Clang_Qt_5_13_0_for_Android_ARMv7-Debug\android-build\build\generated\source\aidl\debug -IC:\QtCreator\5.13.0\android_armv7\src\android\java\src -IC:\Users\cansunurk\Documents\build-denemee-Android_for_armeabi_v7a_Clang_Qt_5_13_0_for_Android_ARMv7-Debug\android-build\src\debug\aidl -IC:\Users\cansunurk\Documents\build-denemee-Android_for_armeabi_v7a_Clang_Qt_5_13_0_for_Android_ARMv7-Debug\android-build\src -IC:\Users\cansunurk\Documents\build-denemee-Android_for_armeabi_v7a_Clang_Qt_5_13_0_for_Android_ARMv7-Debug\android-build\aidl -dC:\Users\CANSUN~1\AppData\Local\Temp\aidl8998818284823510668.d C:\QtCreator\5.13.0\android_armv7\src\android\java\src\org\kde\necessitas\ministro\IMinistro.aidl}

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BU?LD FAILED in 14s
3 actionable tasks: 1 executed, 2 up-to-date
Building the android package failed!
  -- For more information, run this command with --verbose.
10:44:02: The process "C:\QtCreator\5.13.0\android_armv7\bin\androiddeployqt.exe" exited with code 14.
Error while building/deploying project denemee (kit: Android for armeabi-v7a (Clang Qt 5.13.0 for Android ARMv7))
When executing step "Build Android APK"
10:44:02: Elapsed time: 00:20.

1 个答案:

答案 0 :(得分:0)

我通过SDK Build-Tools解决了这个问题。如果有相同的问题,需要按照这种方式进行,

Android Studio>设置> Android SDK> SDK工具(显示软件包详细信息)>版本29(未选中)