I created a new project focused on L. preview. However, the starter activity that sdk generates extends ActionBarActivity, however, when I try to run a function generated from scratch, it throws the following exception:
Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:110) at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:57) at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:99)
I looked around, but Theme.AppCompat.Material does not seem to exist. How to get ActionBarActivity to use new material topics?
My build.gradle:
apply plugin: 'com.android.application' android { compileSdkVersion 'android-L' buildToolsVersion '20.0.0' defaultConfig { applicationId 'com.sdchang.example' minSdkVersion 'L' targetSdkVersion 'L' versionCode 1 versionName '1.0' } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } productFlavors { } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.+' compile 'com.mcxiaoke.volley:library:1.0.+@aar' compile 'com.google.code.gson:gson:2.2.+' compile 'com.squareup.okhttp:okhttp:2.0.+' }
android material-design
Some Noob Student Jul 03. '14 at 5:12 2014-07-03 05:12
source share