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
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
Post a Comment