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


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 application using ‘compileSdkVersion 26’.
Attaching a screenshot of the error.enter image description here


If you recently updated your project to API, Try doing

File -> Invalidate Caches / Restart


File -> Sync Project with Gradle Files

this resolve for me.

Answered By – Upendra Shah

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published