I refer to this link Error: ambiguous method call. And findViewById (int) in AppCompactActivity and Activity to solve, but there is no android.app.Activity import, and also if I convert my android.support.v7.app.AppCompatActivity import to android.app.Activity, then there will be an error, but I I want to use AppCompatActivity.
I am also updating all the libraries in the SDK, as well as being invalid and rebooting, but nothing works.
why does this error occur and how to solve it?
I think you have something like this
ViewClass view = (ViewClass)findViewById(R.id.view);
, API? ,
ViewClass view = findViewById(R.id.view); // without redundant cast
findViewById API 25, . SDK
findViewById
API 26, /, gradle.