Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View.setBackground is available only for API level 16 and above #11

Closed
bartek-mindojo opened this issue Apr 24, 2014 · 2 comments
Closed

Comments

@bartek-mindojo
Copy link

I get the following exception report:

java.lang.NoSuchMethodError: android.view.View.setBackground
at fr.nicolaspomepuy.discreetapprate.AppRate.showAppRate(AppRate.java:568)
at fr.nicolaspomepuy.discreetapprate.AppRate.checkAndShow(AppRate.java:355)

To get rid of it I set the following two lines to use setBackgroundDrawable method (although I know it might not be the best fix):

close.setBackground(activity.getResources().getDrawable(R.drawable.selectable_button_light));
close.setBackground(activity.getResources().getDrawable(R.drawable.selectable_button_dark));
@alexeyvasilyev
Copy link

Just checked the logs. I also have the same problem with the users who have Android 2.3 - 4.0.4.

@PomepuyN
Copy link
Owner

I just fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants