Skip to content
Advertisement

Cannot resolve method ‘findViewByID(int)’ in Android Studio

I only just started coding for androud, but I’ve been getting the error: “Cannot resolve method ‘findViewByID(int)'” in android studio

I can’t seem to find out what is wrong, have tried setting contentView, implementing OnClickListenener, but none of these fixed anything.

full code below, the MainActivity Method is where it all happens:

JavaScript

Advertisement

Answer

It’s just a typo that you have made. You should use “Id” instead of “ID”.

So your

JavaScript

Becomes

JavaScript
Advertisement