Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Cannot get property 'compileSdkVersion' on extra properties extension as it does not exist

I am using SpecialCyCi/AndroidResideMenu third party library (github) in my android project. I have imported ResideMenu project to my workspace and made it as a module dependency library project.

While build the project I got the following error:

Error:(7) A problem occurred evaluating project ':ResideMenu'.
Cannot get property 'compileSdkVersion' on extra properties extension as it does not exist  

android studio log error

like image 597
manDroid Avatar asked Jun 25 '15 08:06

manDroid


1 Answers

If you explain more I can help better but most probably problem is in your gradle. You need to say that you have extension file to top-level gradle. Let me explain how it works:

In your app-level gradle file, there should be configuration like that:

def config = rootProject.extensions.getByName("ext")

You can use configurations from extension file like that:

android { 
  compileSdkVersion config.getAt("compileSdkVersion") 
}

But, you need to add extension file to your root of project:

dependency-versions.gradle

ext {
compileSdkVersion = 25
//...
}

and you need to say it to your top-level gradle like that:

def config = rootProject.extensions.getByName("ext")
like image 178
farukcankaya Avatar answered Oct 24 '22 23:10

farukcankaya