Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


OverviewFelgo 2 Support (Qt 5) › Android build failed, maybe because of gradle or version of something…

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #20514


    From several months I’m encountering difficulties to build Android APKs.
    I’m working with Windows 10 with last version of Felgo and Android SDK and NDK installed as said in Felgo docs.
    Android build is failing with the default settings but if I’m changing versions of android.support it works !

    1st, here is my build.gradle file which is the one by default for an empty app project template:
    <div>buildscript {
    repositories {
    <div>    dependencies {
    classpath ‘com.android.tools.build:gradle:2.3.3’
    <div>allprojects {
    repositories {
    maven { url ‘https://maven.google.com’ }
    maven { url ‘https://sdk.felgo.com/maven/’ }
    <div>apply plugin: ‘com.android.application'</div>
    <div>dependencies {
    compile fileTree(dir: ‘libs’, include: [‘*.jar’])</div>
    <div>    compile “com.android.support:support-core-utils:27.1.0”
    compile “com.android.support:appcompat-v7:27.1.0″</div>
    <div>    compile ‘net.vplay.plugins:plugin-onesignal:2.+’
    <div>android {
    * The following variables:
    * – androidBuildToolsVersion,
    * – androidCompileSdkVersion
    * – qt5AndroidDir – holds the path to qt android files
    *                   needed to build any Qt application
    *                   on Android.
    * are defined in gradle.properties file. This file is
    * updated by QtCreator and androiddeployqt tools.
    * Changing them manually might break the compilation!
    <div>    compileSdkVersion androidCompileSdkVersion.toInteger()
    buildToolsVersion androidBuildToolsVersion</div>
    <div>    defaultConfig.applicationId = ‘com.yourcompany.wizardEVAP.BuildAPKTest01′</div>
    <div>    sourceSets {
    main {
    manifest.srcFile ‘AndroidManifest.xml’
    java.srcDirs = [qt5AndroidDir + ‘/src’, ‘src’, ‘java’]
    aidl.srcDirs = [qt5AndroidDir + ‘/src’, ‘src’, ‘aidl’]
    res.srcDirs = [qt5AndroidDir + ‘/res’, ‘res’]
    resources.srcDirs = [‘src’]
    renderscript.srcDirs = [‘src’]
    assets.srcDirs = [‘assets’]
    jniLibs.srcDirs = [‘libs’]
    <div>    lintOptions {
    abortOnError false
    So this one goes to a build which failed with this error msg:

    <div>:processDebugResources FAILED</div>
    <div>FAILURE: Build failed with an exception.</div>
    <div>* What went wrong:
    Execution failed for task ‘:processDebugResources’.
    > com.android.ide.common.process.ProcessException: Failed to execute aapt</div>
    <div>* Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.</div>
    <div>BUILD FAILED</div>

    So… to make the Android build working well I’ve managed to change these 2 lines in my gradle file:
    compile “com.android.support:support-core-utils:25.1.0”
    compile “com.android.support:appcompat-v7:25.1.0”
    And it works but only if I comment or remove this line:
    compile ‘net.vplay.plugins:plugin-onesignal:2.+’

    But I need OneSignal!!!
    So I hope my explanations will help you to give me a solution, because I must admit that I’m not very familiar with the sdk Android to find a solution myself

    Thank you


    Felgo Team

    Hi Jean-Marc,

    So this happens for every empty project as soon as the ‘net.vplay.plugins:plugin-onesignal:2.+’ OneSignal library dependency is added?

    Which Android SDK and NDK version are using at the moment? We’ll have closer look to see if we can reproduce the issue!




    Hi, thank you for your answer.

    It happens (failed for Android build) for every empty project EVEN if OneSignal is not added.

    But if I’m changing these 2 lines:

    compile “com.android.support:support-core-utils:27.1.0”
    compile “com.android.support:appcompat-v7:27.1.0”
    compile “com.android.support:support-core-utils:25.1.0”
    compile “com.android.support:appcompat-v7:25.1.0”

    then I can build for Android and everything’s working well…
    BUT, with this modification, if then I add the ‘net.vplay.plugins:plugin-onesignal:2.+’ OneSignal library, then the Android build failed again!

    Here are my SDK and NDK versions (copied for QtCreator options):
    Android settings are OK. (SDK Version: 25.2.5, NDK Version: 14.0.3770861)




    Hi Günther,

    Do you have any clue or idea about what is going wrong ?




    Felgo Team

    Hi Jean-Marc,
    ​We did some tests based on your SDK / NDK version setup. When using Android SDK version 25, we can reproduce the issue you mentioned.

    ​The OneSignal plugin requires the appcompat and utils library of version 27, which are not compatible with Android SDK 25.
    ​So to be able to build for Android with One Signal annd these library versions, please update your Android SDK to e.g. version 26.
    ​You should be able to build for Android without issues then.

    ​Let me know if this solves the issue for you!

    Note: You after installing the new Android SDK, you can choose the used SDK version in the Project Configuration (left Qt Creator Tab). The Android build SDK option is available in the “Build Android APK” section of the project settings for Android. Please also make sure to create a fresh and clean build after updating the environment.

    ​Günther from Felgo


Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded