Android.content.res.resources$notfoundexception: Resource Id #0x7f07007e
Solution 1:
Your app crash when the activity concerned should be displayed ?
Check if in you activity you have a drawable v24 like this

Then, if yes, change the display of your files from Android to Project at the very top of the hierarchy of your files :
From

to
And drag and drop the drawable in the directory drawable v-24 to the directory drawable.
That's all. Try if it's ok
Edit : I found that the problem may arise on the Android 6 API 23 but not for higher API
Solution 2:
By seeing the logs. The problem is in your drawable background take a look at it. You have type X24 image change it and it will fix your problem.
Second thing is you are seeing two images at a time. So you need to remove the background that you are setting in your .xml file and you are good to go.
Solution 3:
You are using context.getDrawable(R.drawable.fillup) which will only work in versions higher than LOLLIPOP. Use context.getResources().getDrawable(R.drawable.fillup) to get the images from resource.
Solution 4:
<CheckBox android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="new checkbox"
android:background="@drawable/checkbox_background"
android:button="@drawable/checkbox" />
Try to use checkbox instead of ImageView
<?xml version="1.0" encoding="utf-8"?><selectorxmlns:android="http://schemas.android.com/apk/res/android"><itemandroid:state_checked="true"android:state_focused="true"android:drawable="@drawable/fillup" /><itemandroid:state_checked="false"android:state_focused="true"android:drawable="@drawable/emptyup" /><itemandroid:state_checked="false"android:drawable="@drawable/emptyup" /><itemandroid:state_checked="true"android:drawable="@drawable/fillup" /></selector>if (a.getConstantState().equals(context.getDrawable(R.drawable.emptyup).getConstantState())){
i.setImageDrawable(context.getDrawable(R.drawable.fillup)); } else { i.setImageDrawable(context.getDrawable(R.drawable.emptyup)); }
These lines are giving you error because of your android version issue.
Solution 5:
Follow this https://developer.android.com/guide/topics/graphics/vector-drawable-resources.html#vector-drawables-backward-solution, You should use setImageResource() instead of setImageDrawable()

Post a Comment for "Android.content.res.resources$notfoundexception: Resource Id #0x7f07007e"