-2

i create a new project without change and the icon is missing.i find some similar question but it not like me. enter image description here

1 Answers1

0

Android Studio uses the AppCompat theme by default, which no longer uses an icon. You can add one by adding the following to your onCreate() but it is no longer the norm/recommended to have a logo in your app bar.

ActionBar actionBar = getSupportActionBar();
actionBar.setLogo(R.drawable.my_logo);
Peter Keefe
  • 1,095
  • 14
  • 22