Android Studio provides this error when compiling a project. I searched and discovered that this could be due to
android
The block at the top of build.gradle. But in my build.gradle this may not be the problem. here are my gradle files.
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } android { compileSdkVersion 19 } dependencies {
}
app.gradle
apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.ptrprograms.chromecast" minSdkVersion 14 targetSdkVersion 20 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:20.0.0' compile 'com.android.support:mediarouter-v7:19.0.+' compile 'com.google.android.gms:play-services:6.1.11'
}
source share