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.
- ERROR x86 emulation currently requires hardware acceleration. Intel HAXM is not installed on this machine
- How to create Toast messages in Android?
- Java: Check Internet connection on Android Device (Wifi or Mobile)
- Change Title text for Android Activity using java code
- Android RatingBar Example
- Android : Execute some code after back button is pressed
- Audio Video Network protocols supported by Android OS Devices
- This class should be public (android.support.v7.internal.widget.ActionBarView.HomeView) Lint Error
- Check Internet Connection WIFI 4G is active on Android Programmatically
- Change Height of Android ActionBar
- Generate Facebook Android SDK keyhash using java code
- How to hide or cancel Toast message in Android Programming
- Make Android Toolbar text center aligned
- How to Disable EditText Keyboard Android App
- How to repeat background image in Android Activity
- How to make Android EditText not editable
- [FIX] AndroidRuntime: FATAL EXCEPTION: main - java.lang.RuntimeException NullPointerException
- Android Eclipse This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in
- How to Add a horizontal line in Android Layout
- Android Disable back button programatically
- 21 Useful Android Emulator Short-cut Keyboard Keys
- Android xml error Attribute is missing the Android namespace prefix [Solution]
- Fixing Android unknown error 961 while downloading app
- Share Image and Text on Instagram from Android App using Share Dialog
- How to add border to Android Button