Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Material theme on L preview

The L Developer Preview is currently on API level 20. However, apparently the themes require API level 21.

@android:style/Theme.Material.Light.DarkActionBar requires API level 21

Is this a mistake, am I doing something wrong, or is it just not possible to use Material on the L Preview?

like image 638
nhaarman Avatar asked Jun 26 '14 20:06

nhaarman


1 Answers

To elaborate on @panini's comments, I'm using this in my build.gradle:

android {
    compileSdkVersion 'android-L'
    buildToolsVersion '20.0.0'

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 'L'
        versionName buildVersion.version
    }

/* ... */
}

Placing the styles.xml in the values-v21 folder, enables the theme to run on the L Preview.

like image 191
nhaarman Avatar answered Sep 28 '22 10:09

nhaarman