Friday 29 May 2015

ANDROID STUDIO : Rendering problems in v 1.1.0 / 1.2

On recent Android Studio update v1.1 or v1.2 if you are facing rendering problem in xml on adding android.support.v7.widget.Toolbar or another android.support.v7.widget.*,
try fixing the error by either switching preview API level from 22 to 21 or add Base. to default AppTheme in res/values/styles.xml

A) Switching API level from 22 to 21 in preview pane.
 
 












B)  Changing AppTheme parent in res/values/styles.xml. (i.e Adding Base. to default AppTheme.)
Replace
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
</style>
with
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
</style>

Reference:  http://stackoverflow.com/questions/29062658/rendering-problems-in-android-studio-v-1-1-0/29964412#29964412

No comments:

Post a Comment