I'm receiving this error message in the Android Preview Designer as "Rendering Problems". I'm using API 22 to render and migrating to the new API support v4:22.1+ and v7:22.1+.
Rendering Problems Exception raised during rendering: View android.support.v7.widget.Toolbar not created with the right context
Scenario:
- Using Android Studio v1.2RC
- Render API v22 (changing to 21 or 19 does not solve it)
- Migrating ActivityBarActivity to 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://ift.tt/nIICcg" xmlns:app="http://ift.tt/GEGVYd" 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" />
Aucun commentaire:
Enregistrer un commentaire