[Interest] Android: build failure (Qt 6.2)

Alexander Dyagilev alervdvcw at gmail.com
Sun Sep 19 23:37:12 CEST 2021


Hello,

I'm trying to build my Qt5 app with new Qt 6.2 RC for Android arm7.

I'm getting this error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android-build'.
 > Failed to notify project evaluation listener.
    > 
org.gradle.api.file.ProjectLayout.fileProperty(Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/file/RegularFileProperty;

* 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

It seems I have some incompatibility in my Gradle files, but I don't 
know what is wrong. Can you help?

I have only build.gradle file inside of my project's directory. Its 
contents:

buildscript {
     repositories {
         google()
         jcenter()
     }

     dependencies {
         classpath 'com.android.tools.build:gradle:3.2.0'
     }
}

repositories {
     google()
     jcenter()
}

apply plugin: 'com.android.application'

dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
//    implementation "com.android.support:support-v4:26.1.0"
     implementation 'com.android.support:appcompat-v7:28.0.0'
     implementation 'com.google.code.gson:gson:2.7'
     implementation "com.android.support:design:28.0.0"
}

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!
      *******************************************************/

     compileSdkVersion androidCompileSdkVersion.toInteger()

     buildToolsVersion androidBuildToolsVersion

     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']
        }
     }

     lintOptions {
         abortOnError false
     }
}



More information about the Interest mailing list