Error : Ambiguous method call. Both findViewById (int) in AppCompactActivity and Activity

后端 未结 17 2075
我寻月下人不归
我寻月下人不归 2021-02-05 00:29

I am getting the error: \"Ambiguous method call\" on initializing Toolbar using Android Studio 3.0 RC1. I have extended my Activity with AppCompatActivity and compiling my appli

17条回答
  •  时光说笑
    2021-02-05 00:56

    You have

    import android.support.v7.app.AppCompatActivity
    import android.app.Activity
    

    both in your code. Remove import android.app.Activity as I can see, it's not required for you.

提交回复
热议问题