I'm trying to add the support action bar to my Android app, but right at the start where I have
<style name="AppBaseTheme" parent="android:Theme.AppCompat.Light">
Run Code Online (Sandbox Code Playgroud)
I get an error No resource found that matches the given name: android:Theme.AppCompat.Light.
I can import android.support.v7.app.ActionBar and android.support.v7.app.ActionBarActivity so I think I've added the support libraries correctly. Why do Android dev docs gloss over this? It should be Lesson #1.
It should be:
<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
Run Code Online (Sandbox Code Playgroud)
android:Theme.AppCompat.Light is incorrect. Everything with the namespace 'android' refers to properties from the framework ( but Theme.AppCompat.Light only exists in the support library).
| 归档时间: |
|
| 查看次数: |
234 次 |
| 最近记录: |