5

I'm learning Android Studio, and this error keeps popping up.

(on Emulators)

pkg: /data/local/tmp/com.test.sunshine
Failure [INSTALL_FAILED_UID_CHANGED]

and this (on Physical Device)

pkg: /data/local/tmp/com.test.sunshine
Failure [INSTALL_FAILED_DEXOPT]

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.

I tried transferring the apk to the emulator and installing it from there. Still the same error comes up

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.

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.

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.

Here is my gradle script:

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'
}
  • EDIT

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.

Marlon
  • 1,839
  • 2
  • 19
  • 42
  • INSTALL_FAILED_UID_CHANGED is a duplicate of http://stackoverflow.com/questions/16277422/android-install-failed-uid-changed. To debug INSTALL_FAILED_DEXOPT have a look at your logcat output when the installation fails. – Scott Barta Dec 11 '14 at 16:15
  • @ScottBarta I looked into that thread, all they suggest is to remove previous files associated with the package, however my problem is with a fresh install. The package is not yet installed and Android Studio keeps prompting me to uninstall. – Marlon Dec 12 '14 at 04:13
  • Have you perhaps developed a previous app with the same application ID and deployed it to the same device? – Scott Barta Dec 12 '14 at 05:35
  • No I have not, I completely remove all traces of the app, its data folders as well as root files/folders. Even on a fresh install it shows up. I edited the question because the problem went away when I updated android studio. – Marlon Sep 29 '15 at 08:09

0 Answers0