(Android studio 3.1) when setting the background for the button control, the user-defined drawable file is used. No error is reported when running on Android 8.0, but an error is reported when running on Android 4.42. The error is as follows:
Finally, we find that when we switch to project mode, we can customize our own drawable file BT_ bg.xml The file is placed in the drawable-v24 folder, so BT_ bg.xml Move the file into the drawable folder (drawable-v24 can only be seen in project mode, but not in Android mode, as shown in the figure above). Run it again and the problem is solved.
Read More:
- [Android] ImageView setting background image error: error inflating class ImageView
- “Failed to convert @ drawable / XX into a drawable exception details are logged in window”
- Python combined with Matplotlib to add button
- Android studio “sync project with gradle files” button disappears
- Solution to the problem that the toolbar menu button cannot be clicked
- CSS remove the blue box after button click
- Android listview entry button click state chaos solution
- AAPT: error: ‘null‘ is incompatible with attribute button (attr) reference.
- The shell runs the class file and imports the jar package that the class depends on
- Sublime text add to right mouse button function
- error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not
- Win10, add sublime text in the right mouse button menu to open
- How to center your HTML button itself? ——Use the align attribute of center or Div
- Error inflating class fragment error when loading custom fragment with fragment (valid)
- Hide print button when printing page in front end
- Click the button to jump to a new window
- Click the button to use in the react project window.open Methods open a new page and click the data again
- “Input button submit is not setup” solution
- Remove the delete button icon from the El upload component
- The Vue elementui switch button uses an int type value