I create a simple project and then I right-click on the project and then I use the make mudole app
option. Now I have two build.gradle
folders: 1- build.gradle:project My Application
. 2- build.gradle: Mudole app
. the first build.gradle
is as follows:
// Top-level build file where you can add configuration options common to all sub-projects/modules. apply plugin: 'com.android.library' buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } }
And the second Build.gradle
folder is as follows:
apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.0" defaultConfig { applicationId "com.exam.exam.myapplication" minSdkVersion 7 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) }
And now I click on the run
option to create aar
file from this project But I get the following error:
Error:Cause: buildToolsVersion is not specified.
I had the same issue. What I was doing wrong was the placing of apply plugin statement in the root gradle of the project. When I placed it in the app gradle then the issue got resolved.
What I would suggest is to check if you are placing some statement in the root gradle that you should be placing in the app gradle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With