Closed ernes87lp closed 10 years ago
I'm also getting this error in Eclipse.
I was able to fix this problem by editing the Attributes class. I changed the setThemeSilent and setTheme methods and added a method:
public void setTheme(int theme, Resources resources)
{
this.theme = theme;
try
{
colors = resources.getIntArray(theme);
}
catch (NotFoundException e)
{
checkNullColors();
}
attributeChangeListener.onThemeChange();
}
public void setThemeSilent(int customTheme, Resources resources)
{
this.theme = customTheme;
try
{
colors = resources.getIntArray(customTheme);
}
catch (NotFoundException e)
{
checkNullColors();
}
}
private void checkNullColors()
{
if (colors == null)
{
colors = new int[4];
colors[0] = Color.parseColor("#ad843d");
colors[1] = Color.parseColor("#d4a14a");
colors[2] = Color.parseColor("#fbbf58");
colors[3] = Color.parseColor("#fae8c8");
}
}
When viewing the UI through the UI builder, Eclipse isn't able to find the request integer array using the resources, so it throws a NotFoundException. Whenever this happens, we make sure the colors are being set using the default color scheme for the sand theme. This is not an ideal solution because it means we can't view other themes in the UI builder, but it does allow us to edit the positions of elements on screen.
I fixed this issue but didn't update the repository yet. Thanks @u3amar for suggestion. I'll close the issue and comment when the repo is updated.
This issue is fixed with version 2.0.1
Hi, I'm having this issue on Android Studio, I don't know how to fix it. It's weird because I did a test a month ago and everything worked fine. I'm using the API 19. I'm trying to add a simpel edit text. Also, if I run the app on the emulator, the control is not rendered properly.
Here's a screenshot of the error.
And here's the layout
Thanks in advance