title: Error when Android Studio tries to install apk
body: <p>I'm pretty new to Android and was trying out a simple app where you take a picture and send it to another activity for editing. I am using Android Studio and OpenCV 3.1 for this. Everything was working. But then as soon as I started writing the code for the second activity, it fails to install the apk on my tablet with the following error:</p>
  
  <blockquote>
    <p><strong>The currently selected variant "x86-debug" uses split APKs, but none
    of the 1 split apks are compatible with the current device with
    density "-1" and ABIs "". Error while Installing APK</strong></p>
  </blockquote>
  
  <p>Strange thing is, the activity was being called just before I modified the onCreate method. Thinking I messed up something, I disabled everything, cleaned and tried again. Now the app refuses to install, even though it is in the same state as it was when everything was working.</p>
  
  <p>My second activity is as follows:</p>
  
  <pre><code>public class SecondaryActivity extends Activity{
  
      public static final String PHOTO_MIME_TYPE = "image/png";
      public static final String EXTRA_PHOTO_URI = "com.example.morpheus.myapplication.SecondaryActivity.extra.PHOTO_URI";
      public static final String EXTRA_PHOTO_DATA_PATH = "com.example.morpheus.myapplication.SecondaryActivity.extra.PHOTO_DATA_PATH";
      private Uri mUri;
      private String mDataPath;
      private Mat photo;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          final Intent intent = getIntent();
          long addr = intent.getLongExtra("img_addr", 0);
          photo = new Mat(addr);
  
          mUri = intent.getParcelableExtra(EXTRA_PHOTO_URI);
          mDataPath = intent.getStringExtra(EXTRA_PHOTO_DATA_PATH);
  
          final ImageView imageView = new ImageView(this);
          imageView.setImageURI(mUri);
  
          setContentView(imageView);
  
      }
  }
  </code></pre>
  
  <p>The place where the above activity is being called is:</p>
  
  <pre><code>        final ContentValues values = new ContentValues();
          values.put(MediaStore.MediaColumns.DATA, photoPath);
          values.put(MediaStore.Images.Media.MIME_TYPE, SecondaryActivity.PHOTO_MIME_TYPE);
          values.put(MediaStore.Images.Media.TITLE, appName);
          values.put(MediaStore.Images.Media.DESCRIPTION, appName);
          values.put(MediaStore.Images.Media.DATE_TAKEN, currentTime);
  
          File album = new File(albumPath);
          if(album.isDirectory() &amp;&amp; !album.mkdirs()){
              Log.e(TAG, "Failed to create album directory at " + albumPath);
              onTakePhotoFailed();
              return;
          }
          Imgproc.cvtColor(rgba, mBGR, Imgproc.COLOR_RGBA2BGR, 3);
          if(!Imgcodecs.imwrite(photoPath, mBGR)){
              Log.e(TAG, "Failed to save photo to " + photoPath);
              onTakePhotoFailed();
          }
          Log.d(TAG, "Photo saved successfully to " + photoPath);
  
          Uri uri;
          try{
              uri=getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
          } catch (final Exception e){
              Log.e(TAG, "Failed to insert photo into MediaStore");
              e.printStackTrace();
              File photo = new File(photoPath);
              if(!photo.delete()){
                  Log.e(TAG, "Failed to delete non-inserted photo!");
              }
  
              onTakePhotoFailed();
              return;
          }
  
          final Intent intent = new Intent(this, SecondaryActivity.class);
          intent.putExtra(SecondaryActivity.EXTRA_PHOTO_URI, uri);
          intent.putExtra(SecondaryActivity.EXTRA_PHOTO_DATA_PATH, photoPath);
          long addr = mBGR.getNativeObjAddr();
          intent.putExtra("img_addr", addr);
  
          startActivity(intent);
      }
  </code></pre>
  
  <p>The strangest thing is, even after reverting the codes to the point where it worked, it is not installing. I tried manually uninstalling the app from the tablet. But that doesn't help either.</p>
  
  <p>I am using an Asus ZenPad 8 with an Intel Atom processor.</p>
  
  <p>Any help would be highly appreciated as my entire project is stuck because of this.</p>