【问题标题】:Build failed with an exception in QT/android-armv7在 QT/android-armv7 中构建失败并出现异常
【发布时间】:2019-07-29 12:33:43
【问题描述】:

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

这是一个 Qt 5.12.2,编译器是 Android for armeabi-v7a 和 Android Studio(sdk 和 ndk-bundle)

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.

【问题讨论】:

  • 好吧,正如错误消息所暗示的那样,您是否尝试过使用 --info--debug--stacktrace 标志运行 gradle 以获取更多信息?

标签: android qt android-studio qt-creator


【解决方案1】:

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

Android Studio>设置>Android SDK> SDK Tools(Show Package Details)> Version 29 (Unchecked)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-21
    • 2022-07-20
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 2023-03-22
    • 1970-01-01
    相关资源
    最近更新 更多