If you are getting this kind of Lint error messages in your Android Logcat console then the reason can be one of the following,
1. Due to invalid Resource Identifier specified.
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 may be passing R.string.something instead of R.drawable.something. Just check for such kind of access codes in your Java file and rectify them.
2. Passing the wrong constant to a method.
You might be passing a wrong constant to a method which might be expecting something elseFor example, when calling View#setLayoutDirection, the parameter must be android.view.View.LAYOUT_DIRECTION_LTR or android.view.View.LAYOUT_DIRECTION_RTL. Let's 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 that 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.
- Android Alert Dialog with Checkboxes example
- Android xml error Attribute is missing the Android namespace prefix [Solution]
- auth_client_using_bad_version_title : Error Android Lint
- Android Emulator Soft Back button action using Computer keyboard
- Android read text file from internal storage
- This class should be public (android.support.v7.internal.widget.ActionBarView.HomeView) Lint Error
- [Solutions] Android Error in an XML file: aborting build. Eclipse SDK
- Android AlertDialog with Yes No and Cancel Button
- fill_parent vs match_parent vs wrap_content
- Share Image and Text on Instagram from Android App using Share Dialog
- This Toast was not created with Toast.makeText() : Android RuntimeException
- How to make Android EditText not editable
- Force android app to run in Landscape mode programatically
- Android AlertDialog with 3 buttons example
- appcompat_v7 errors after updates to API level 21 Material Theme
- Android : Duplicate registration for activity com.example.abc
- Make Android View Scrollable both Horizontally and Vertically
- Device not compatible error Android Google Play Store
- How to create Toast messages in Android
- Plug-in com.android.ide.eclipse.adt was unable to lead class Error
- Android Wifi WPA2/WPA Connects and Disconnects issue
- Android Disable EditText from Auto Focus on Activity load
- Android Constant and Resource Type Mismatches Lint
- Remove ActionBar from Activity that extends appcompat-v7
- How to Disable EditText Keyboard Android App
- Hide files and folders on Mac OS X - Mac-OS-X
- Android : Execute some code after back button is pressed - Android
- Bootstrap Nav Menu Dropdown on hover - Bootstrap
- Changing Android Intent Tittle using java code - Android
- Share Image and Text on Instagram from Android App using Share Dialog - Android
- Error 404 Tomcat homepage http://localhost:8080/ not displayed - Tomcat
- Hyperlink in html (anchor tag) without a underline - Html
- Change Max and Min Value of Android Seekbar Programmatically - Android
- Channel 50 SMSes received every few minutes Android Phones - Android
- [Solved] SharePoint Search Internal server error exception - SharePoint
- Adding Sub Headings to Bootstrap Header tags - Html
- How to insert image into Google Sheets cell - Google
- [IRCTC] Indian railways official eRail API 1.1 for developers to get train info - HowTos
- Add Text at Start and End of Each Line Notepad++ - NotepadPlusPlus
- Android AlertDialog Programatically Example - Android