Exception raised during rendering: View android.support.v7.widget.Toolbar not created with the right context -


i'm receiving error message in android preview designer "rendering problems". i'm using api 22 render , migrating new api support v4:22.1+ , v7:22.1+.

rendering problems exception raised during rendering: view android.support.v7.widget.toolbar not created right context

rendering problems

scenario:

  • using android studio v1.2rc
  • render api v22 (changing 21 or 19 not solve it)
  • migrating activitybaractivity appcompatactivity
  • compile section:

    compile 'com.android.support:support-v4:22.1.+' compile 'com.android.support:appcompat-v7:22.1.+'

  • toolbar

    <android.support.v7.widget.toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" android:layout_height="?attr/actionbarsize" android:layout_width="match_parent" android:background="?attr/colorprimary" android:elevation="4dp" app:theme="@style/themeoverlay.appcompat.dark.actionbar" app:popuptheme="@style/theme.appcompat" />

the error caused because had remove in toolbar layout, "app" section , change 'app:' 'android:'.

remove:

xmlns:app="http://schemas.android.com/apk/res-auto"

replace:

app:theme="@style/themeoverlay.appcompat.dark.actionbar" app:popuptheme="@style/theme.appcompat"

for:

android:theme="@style/themeoverlay.appcompat.dark.actionbar" android:popuptheme="@style/theme.appcompat"


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -