Android : Exception raised during rendering: action_bar API 22

I recently updated to API Level 22 i.e. Android Lollipop version: 5.1.1, I see that the Design Layout is unable to display layout.xml files and shows the following error message,

Rendering Problems: Exception raised during rendering: action_bar

This seems like a bug in buildToolsVersion 22 or the Theme issue with the new AppCompact version for 22. maybe fixed soon by Google Android Team. Meanwhile the workaround that I have found is to use the compile version as 21 i.e 5.0 and buildToolsVersion as 21.1.2 in the build.gradle file.

In the Design View, Change the Android Version from API Level 22 to 21 to render the Views on Android Emulator.

Change API level to 21 to fix action_bar error
Change API level to 21 to fix action_bar error

So the solution is to fall back to the previous Build version until an update is available From Android version 22 ActionBar is deprecated, Google now says that you must instead use Toolbar. Read more about toolbars on Android Developers site:

Recent Posts:

Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.