java.lang.IllegalArgumentException: AppCompat does not support the current theme features

后端 未结 15 1105
你的背包
你的背包 2020-12-04 11:32

I tried to migrate a project from Eclipse to Android studio. Finally I am able to run it, but at a certain point I got this exception, and I found nothing in google about th

15条回答
  •  渐次进展
    2020-12-04 12:12

    just Use this in your style.xml no other editing is needed

     
    

    don't add anything in to activity file please leave it

    public class Main extends ActionBarActivity {
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    
     }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
    } 
    
    @Override
     public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    if (id == R.id.action_settings) {
        return true;
    }
    return super.onOptionsItemSelected(item);
    }
    
     }
    

提交回复
热议问题