title: Android Studio INSTALL_FAILED_DEXOPT and INSTALL_FAILED_UID_CHANGED on project run
body: <p>I'm learning Android Studio, and this error keeps popping up.</p>
  
  <p>(on Emulators)</p>
  
  <pre><code>pkg: /data/local/tmp/com.test.sunshine
  Failure [INSTALL_FAILED_UID_CHANGED]
  </code></pre>
  
  <p>and this
  (on Physical Device)</p>
  
  <pre><code>pkg: /data/local/tmp/com.test.sunshine
  Failure [INSTALL_FAILED_DEXOPT]
  </code></pre>
  
  <p>It will prompt to uninstall but nothing happens because the app is not yet installed.
  This is the first time I have run any projects on Android Studio. I have Genymotion emulators running and also tried it on my physical device, still with the same results.</p>
  
  <p>I tried transferring the apk to the emulator and installing it from there. Still the same error comes up</p>
  
  <p>I haven't touched any code, this is the precoded Blank Activity with Fragment.
  I have the latest Android Studio 1.0 as well as the latest SDKs.</p>
  
  <p>I searched through many questions here and they all suggest to remove the app directly with root. I cant because, the app is not installed. I tried to clean then rebuild, still the same.</p>
  
  <p>I'm beggining to suspect its on the gradle Scritps. I'm new to Android Studio so i dont know any of the workings of gradle.</p>
  
  <p>Here is my gradle script:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 21
  buildToolsVersion "21.1.1"
  
  defaultConfig {
      applicationId "com.marlon.sunshine"
      minSdkVersion 14
      targetSdkVersion 21
      versionCode 1
      versionName "1.0"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:21.0.2'
  }
  </code></pre>
  
  <ul>
  <li>EDIT</li>
  </ul>
  
  <p>Ok so for anyone still looking into this problem, I haven't found any solution to this, the error just disappeared when I updated Android Studio. So the latest updates of the IDE must have made a solution. </p>