Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. gradle errors :not found property
Forum Updated to NodeBB v4.3 + New Features

gradle errors :not found property

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 1 Posters 626 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ali1377
    wrote on last edited by
    #1

    hi all.
    I am going to continue a project which has made by another developer.this project run succesfully in his desktop.
    but
    I have problem with gradle.build.
    it makes error about keywords like android ,... .
    why it makes error only in my desktop ?
    here is my build.gradle file:

    buildscript {
    repositories {
    google()
    jcenter()
    }

    dependencies {
    

    classpath 'com.google.gms:google-services:4.3.1'

    classpath 'com.android.support:appcompat-v7:22.2.1'

    classpath 'com.parse.bolts:bolts-tasks:1.3.0'
    

    classpath 'com.parse:parse-android:1.11.0'

    classpath 'com.android.support:design:22.2.1'
    

    classpath 'com.android.support:design:22.2.1'

        classpath fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
        }
    }
    
    allprojects {
      apply plugin: 'com.android.application'
    }
    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
        }
    }
    

    here is my gradle-wrapper
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    distributionUrl=https://services.gradle.org/distributions/gradle-4.6-bin.zip
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists

    how can fix this error?

    A problem occurred evaluating root project 'android-build'.

    Plugin with id 'com.android.application' not found.

    A 1 Reply Last reply
    0
    • A ali1377

      hi all.
      I am going to continue a project which has made by another developer.this project run succesfully in his desktop.
      but
      I have problem with gradle.build.
      it makes error about keywords like android ,... .
      why it makes error only in my desktop ?
      here is my build.gradle file:

      buildscript {
      repositories {
      google()
      jcenter()
      }

      dependencies {
      

      classpath 'com.google.gms:google-services:4.3.1'

      classpath 'com.android.support:appcompat-v7:22.2.1'

      classpath 'com.parse.bolts:bolts-tasks:1.3.0'
      

      classpath 'com.parse:parse-android:1.11.0'

      classpath 'com.android.support:design:22.2.1'
      

      classpath 'com.android.support:design:22.2.1'

          classpath fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
          }
      }
      
      allprojects {
        apply plugin: 'com.android.application'
      }
      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
          }
      }
      

      here is my gradle-wrapper
      distributionBase=GRADLE_USER_HOME
      distributionPath=wrapper/dists
      distributionUrl=https://services.gradle.org/distributions/gradle-4.6-bin.zip
      zipStoreBase=GRADLE_USER_HOME
      zipStorePath=wrapper/dists

      how can fix this error?

      A problem occurred evaluating root project 'android-build'.

      Plugin with id 'com.android.application' not found.

      A Offline
      A Offline
      ali1377
      wrote on last edited by
      #2

      @ali1377
      when I delete plugin line it makes error to android line :

      What went wrong:
      A problem occurred evaluating root project 'android-build'.

      Could not find method android() for arguments [build_5kt6vfvn89yoapx6fdkq5cp9n$_run_closure2@42ef042a] on root project 'android-build' of type org.gradle.api.Project.

      why?
      I read some solution that say aboout top level gradle and module gradle (in android studio) but
      in qt do we have these file ?
      I have just build.gradle and gradle-wrapper .
      are they like perevios pair(top level gradle and module gradle) ?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved