title: Why getDrawable() doesn't work on some Android devices?
body: <p>I am getting "nosuchmethod error" on some user's phones (eg. Motorola Razr i) but it works fine on my HTC. Below is the code.</p>
  
  <pre><code>Drawable rBlack;
  rBlack = getResources().getDrawable(R.drawable.rblack, getTheme());
  </code></pre>
  
  <p>And the Stacktrace:</p>
  
  <pre><code>java.lang.NoSuchMethodError: android.content.res.Resources.getDrawable
  at org.petero.droidfish.myClass.onCreate(myClass.java:434)
  at android.app.Activity.performCreate(Activity.java:5248)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2173)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)
  at android.app.ActivityThread.access$800(ActivityThread.java:139)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:136)
  at android.app.ActivityThread.main(ActivityThread.java:5102)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:803)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
  at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>And if I use this code:</p>
  
  <pre><code>flipButton.setImageDrawable(getDrawable(R.drawable.rblack));
  </code></pre>
  
  <p>I get this error</p>
  
  <pre><code>java.lang.NoSuchMethodError: org.myclass.getDrawable
  at org.myclass.onCreate(myclass.java:435)
  at android.app.Activity.performCreate(Activity.java:5248)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2173)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)
  at android.app.ActivityThread.access$800(ActivityThread.java:139)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:136)
  at android.app.ActivityThread.main(ActivityThread.java:5102)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:803)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
  at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>