If you are getting this kind of Lint error messages in your Android Logcat console then the reason can be one of the following,
You might have provided a wrong type of resource identifier in the Java code,
Example, If you are trying to access a resources file you must use something like Resources.getString(int id), you maybe passing R.string.something instead of R.drawable.something. Just check for such kind of access codes in your Java file and rectify them.
You might be passing a wrong constant to a method which might be expecting something else
Example, when calling View#setLayoutDirection, the parameter must be android.view.View.LAYOUT_DIRECTION_LTR or android.view.View.LAYOUT_DIRECTION_RTL.
Lets see an Example where you have a Button and you try to access this button as button = findViewById(1); , you will get the error message as,
Expected Resource type id : Supplying the wrong type of resource identifier. For example, when calling Resources.getString(int id), you should be passing R.string.something, not R.drawable.something. Passing the wrong constant to a method which expects one of a specific set of constants. For example, when calling View#setLayoutDirection, the parameter must be android.view.View.LAYOUT_DIRECTION_LTR or android.view.View.LAYOUT_DIRECTION_RTL.
Code2care'smission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.