Android studio Gradle :: dependencies {compile 'com.android.support:appcompat-v7:18.0.0' } fails compilation -


i switched android studio development. had created project minsdk,targetsdk , compile sdk google api level 8.

the project compilation fails due following code in build.gradle file.

dependencies {     compile 'com.android.support:appcompat-v7:18.0.0' } 

can tell why hapenning?

my whole build.gradle posted below.

buildscript {     repositories {         mavencentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:0.5.+'     } } apply plugin: 'android'  repositories {     mavencentral() }  android {     compilesdkversion 8     buildtoolsversion "18.1.0"      defaultconfig {         minsdkversion 8         targetsdkversion 8     } }  dependencies {         compile 'com.android.support:appcompat-v7:18.0.0'     } 

below screenshot enter image description here

you can't compile against api below 11 , use appcompat library. references holo style , compiler have no way resolve symbols if you're building against old version.

get rid of problem building against api level 18. won't break app older devices, need heed lint api warnings ensure compatibility. may have re-sync ide gradle files clicking gradle icon on menu bar.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -