androiddeployqt with --gradle errors out as "Failed to apply plugin [id 'myappid']



  • My QtApp for android is supposed to command-line build with gradle on an osx machine. Based on a previous help from this forum, I using --gradle so that the build is done using gradle instead of ant as seen below command I am using in my script.

    androiddeployqt --sign MyKeystore --storepass MyPassword --output android-build --gradle --input $PWD/MyQtApp/android-libMyQtApp.so-deployment-settings.json

    After resolving many issues with proxy & connectivity, I am finally getting an error as below when I run my script:

      A problem occurred evaluating root project 'android-build'.
        > Failed to apply plugin [id 'com.mycompany.myappid']
        > Plugin with id 'com.mycompany.myappid' not found.
    

    How can I fix this issue ?

    My build.gradle looks like below:

    buildscript {
    repositories {
    maven {
    url "http://repo1.maven.org/maven2"
    }
    }
    dependencies {
    classpath 'com.android.tools.build:gradle:2.1.3'
    }
    }

    apply plugin: 'com.mycompany.myappid'

    android {
    compileSdkVersion 23
    buildToolsVersion "21.1.2"

    def versionPropsFile = file('version.properties')
    
    if (versionPropsFile.canRead()) {
        def Properties versionProps = new Properties()
    
        versionProps.load(new FileInputStream(versionPropsFile))
    
        def code = versionProps['VERSION_CODE'].toInteger() + 1
    
        versionProps['VERSION_CODE']=code.toString()
        versionProps.store(versionPropsFile.newWriter(), null)
    
        defaultConfig {
            versionCode code
            versionName "1.1"
            minSdkVersion 14
            targetSdkVersion 18
        }
    }
    else {
        throw new GradleException("Could not read version.properties!")
    }
    

    }


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.