title: Why my app keeps crashing
body: <p>Here is the LogCat, hope it helps:</p>
  
  <pre><code>&gt; 01-15 04:10:50.154: E/AndroidRuntime(369): FATAL EXCEPTION: main
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369): java.lang.RuntimeException: Unable to start activity
  &gt; ComponentInfo{com.guzi.uyproductions/com.guzi.uyproductions.MainActivity}:
  &gt; java.lang.ClassCastException: android.widget.ImageButton
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at android.os.Handler.dispatchMessage(Handler.java:99)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at android.os.Looper.loop(Looper.java:130)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at android.app.ActivityThread.main(ActivityThread.java:3683)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at java.lang.reflect.Method.invokeNative(Native Method)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at java.lang.reflect.Method.invoke(Method.java:507)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at dalvik.system.NativeStart.main(Native Method)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369): Caused by: java.lang.ClassCastException: android.widget.ImageButton
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at com.guzi.uyproductions.MainActivity.onCreate(MainActivity.java:21)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
  &gt;         01-15 04:10:50.154: E/AndroidRuntime(369):    ... 11 more
  &gt;         01-15 04:10:52.874: I/Process(369): Sending signal. PID: 369 SIG: 9
  </code></pre>
  
  <p>And this is the .java:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      Button button = (Button)findViewById(R.id.imageButton2);
  
      button.setOnClickListener(new OnClickListener() {
        public void onClick(View arg0) {
          Intent viewIntent =
            new Intent("android.intent.action.VIEW",
              Uri.parse("https://www.google.com"));
            startActivity(viewIntent);
        }
      });
  </code></pre>
  
  <p>If you need more details, let me know </p>