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 else
For 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.
- appcompat_v7 errors after updates to API level 21 Material Theme
- adb: The Android Debug Bridge and Commands
- The Android Virtual Device myEmulator is currently running an emulator and cannot be deleted.
- How to make TextView Text Transparent [Android]
- Android is starting optimizing... app 1 of 1
- How to make Text in TextView bold and italic in Android
- Android Development - How to switch between two Activities
- Android : IOException: Unable to open sync connection!
- Android Toolbar example with appcompat_v7 21
- How to Change Android Title Bar Color?
- How to Add Padding to Android TextView
- JavaScript : redirect page to other url
- Programmatically Send an Email from Android App using Intent
- What is Android Toast.LENGTH_SHORT and Toast. LENGTH_LONG durations
- [Soluiton] You already have the latest version of Android Studio installed
- Detect swipes on Android Activity
- Add Buttons at the bottom of Android Layout xml file
- Android Lint app_name is not translated in af (Afrikaans) am (Amharic) ar (Arabic) bg (Bulgarian)
- Hide Navigation Bar from Android Screen Activity
- Android Disable EditText from Auto Focus on Activity load
- Toast not getting displayed Android App
- How to Enable Developers Option in Android Phones Settings
- Android : Duplicate registration for activity com.example.abc
- Android ListView turns Black or Flickers while Scrolling
- Android Studio Ctrl Shift o auto import not working
- How to Update Roblox on Mac - MacOS
- Open New tab using keyboard shortcut in Mac Terminal - Mac-OS-X
- Random CSV Data File Generator - Tools
- Fix - bash: man: command not found - Linux
- How to Auto Click Mouse on Mac every X Seconds - MacOS
- How to customize SharePoint Modern list form using JSON formatting - SharePoint
- How to install ddtrace - Datadog tracing library for Python - Python
- Run only a Single Unit Test using Gradle - Gradle