error while launching app : Error message:
          $ adb shell am start -n "test.beta1/test.beta1.MainActivity" -a 
          android.intent.action.MAIN -c android.intent.category.LAUNCHER
         Unexpected error while executing: am start -n 
        "test.beta1/test.beta1.MainActivity" -a android.intent.action.MAIN -c 
         android.intent.category.LAUNCHER
        Error while Launching activity
   
MainActivity.java code :
    package test.beta1;

    import android.content.Intent;
    import android.media.Image;
    import android.net.Uri;
    import android.provider.MediaStore;
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;
    import android.widget.ImageView;

      public class MainActivity extends AppCompatActivity implements 
         View.OnClickListener{
        private static final int RESULT_LOAD_IMAGE  = 1;
         ImageView imageToUpload, DownloadImage;
          Button bUploadImage, bDownloadImage;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        imageToUpload  =  (ImageView)  findViewById(R.id.imageToUpload);
        DownloadImage  =  (ImageView)  findViewById(R.id.DownloadImage);

        bUploadImage  = (Button) findViewById(R.id.etUploadName);
        bDownloadImage = (Button) findViewById(R.id.etDownloadName);

        imageToUpload.setOnClickListener(this);
        bUploadImage.setOnClickListener(this);
        bDownloadImage.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
      switch(v.getId()){
          case R.id.imageToUpload:
    Intent galleryIntent = new 
    Intent(Intent.ACTION_PICK,MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
              startActivityForResult(galleryIntent,RESULT_LOAD_IMAGE);
              break;
          case R.id.bUploadImage:

              break;
          case R.id.bDownloadImage:

              break;
      }
    }

        @Override
         protected void onActivityResult(int requestCode, int resultCode, Intent 
        data) 
          {
             super.onActivityResult(requestCode, resultCode, data);
              if(requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && 
              data != null){
              Uri selectedImage  = data.getData();
              imageToUpload.setImageURI(selectedImage);

            }
          }
        }
