Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 239
Sumit T Avatar asked Oct 24 '17 00:10

Sumit T


1 Answers

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.

like image 121
Upendra Shah Avatar answered Sep 24 '22 13:09

Upendra Shah