title: How to set Icon to the Alert Dialog Programatically in Android
body: <p>Em using these statements for creating an Alert Dialog and set icon to it,</p>
  <pre><code>       AlertDialog.Builder builder = new AlertDialog.Builder(this);
  
         builder.setIcon(this.getDrawable(R.drawable.video_downloader));
  
         builder.setTitle(&quot;Congratulations !!!&quot;);
  
         builder.show();
  </code></pre>
  <p>But it is crashing at setIcon, when I checked in drawable folder, the video_downloader icon is there already.</p>
  <pre><code>AndroidRuntime: FATAL EXCEPTION: main
  java.lang.IllegalStateException: Could not execute method of the activity
      at android.view.View$1.onClick(View.java:3607)
      at android.view.View.performClick(View.java:4212)
      at android.view.View$PerformClick.run(View.java:17476)
      at android.os.Handler.handleCallback(Handler.java:800)
      at android.os.Handler.dispatchMessage(Handler.java:100)
      at android.os.Looper.loop(Looper.java:194)
      at android.app.ActivityThread.main(ActivityThread.java:5371)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:525)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
      at dalvik.system.NativeStart.main(Native Method)
   Caused by: java.lang.reflect.InvocationTargetException
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:525)
      at android.view.View$1.onClick(View.java:3602)
      at android.view.View.performClick(View.java:4212) 
      at android.view.View$PerformClick.run(View.java:17476) 
      at android.os.Handler.handleCallback(Handler.java:800) 
      at android.os.Handler.dispatchMessage(Handler.java:100) 
      at android.os.Looper.loop(Looper.java:194) 
      at android.app.ActivityThread.main(ActivityThread.java:5371) 
      at java.lang.reflect.Method.invokeNative(Native Method) 
      at java.lang.reflect.Method.invoke(Method.java:525) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 
      at dalvik.system.NativeStart.main(Native Method) 
   Caused by: **java.lang.NoSuchMethodError**: numan.downloader.Test.Front.getDrawable
      at numan.downloader.Test.Front.GetMedia(Front.java:115)
      at java.lang.reflect.Method.invokeNative(Native Method) 
      at java.lang.reflect.Method.invoke(Method.java:525) 
      at android.view.View$1.onClick(View.java:3602) 
      at android.view.View.performClick(View.java:4212) 
      at android.view.View$PerformClick.run(View.java:17476) 
      at android.os.Handler.handleCallback(Handler.java:800) 
      at android.os.Handler.dispatchMessage(Handler.java:100) 
      at android.os.Looper.loop(Looper.java:194) 
      at android.app.ActivityThread.main(ActivityThread.java:5371) 
      at java.lang.reflect.Method.invokeNative(Native Method) 
      at java.lang.reflect.Method.invoke(Method.java:525) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 
      at dalvik.system.NativeStart.main(Native Method) 
  </code></pre>
  <p>07-31 08:35:51.291 500-519/? E/AppErrorDialog: Failed to get ILowStorageHandle instance</p>