Rendering exception: action_bar

When I create a new project in the Android studio, it does not give any problems, but I look at the activity_main.xml project, it shows me the following: "Rendering problems encountered during rendering: action_bar". I know how to fix this problem, just list this problem sdk version exception for Android version 22 when rendering: action_bar

But I want to know why this is happening, some people know?

+6
source share
1 answer

ActionBar is deprecated, it’s better to use the Toolbar, and it also provides many functions, since the ActionBar API 21 has been replaced by a toolbar, due to which you get this error.

If you specify in your manifest file maxSDK, which is required less than API 21, you will not get this error.

But still use the ToolBar, it allows you to do what you can do with the view

+6
source

Source: https://habr.com/ru/post/984117/


All Articles