I am getting following error
Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
I have tried answers like this
getSupportActionBar().hide(); before setContentView(R.layout.activity_main);
but not sloved.how to solve?