Android.content.res.resources$notfoundexception: Resource Id #0x7f0200d1
I'm getting above error at dialog.setContentView(R.layout.alert_ok); this line even though 'alert_ok' xml is exist in my app's 'layout' folder. Below is my complete java code to di
Solution 1:
I had the same problem, check if the version of the .xml drawable file was built in the same version of the others file.
Mine was (v.24), and was not working.
I had copy and paste a drawable file and changed the color in the code, but when I pasted the file on my drawable folder, the file was converted to (v.24).
I deleted the file and created a new empty drawable file, then I pasted the xml code inside this empty file. The (v.24) was gone and my resource worked just fine.
Hope it helps.
Solution 2:
Dont use context or getApplicationContext, just pass YourActivity.this
finalDialogdialog=newDialog(YourActivity.this, R.style.MyAlertDlgTheme);
Thank you
Solution 3:
Try this:
In android studio Build-->Clean project.
Run your project.
Solution 4:
Just make the following changes, Pass Activity reference instead of context. This worked for me.
finalDialogdialog=newDialog(YourActivity.this, R.style.MyAlertDlgTheme);
Post a Comment for "Android.content.res.resources$notfoundexception: Resource Id #0x7f0200d1"