Question

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

 46  42622  46
1 Jan 1970

Solution

 50

If you recently updated your project to API, Try doing

File -> Invalidate Caches / Restart

then

File -> Sync Project with Gradle Files

this resolve for me.

2018-07-02

Solution

 11

Upgrade to appcompat 27 solved this for me

2017-10-31