Android Studio INSTALL_FAILED_DEXOPT and INSTALL_FAILED_UID_CHANGED on project run

Loading...

Android Studio INSTALL_FAILED_DEXOPT and INSTALL_FAILED_UID_CHANGED on project run

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. 

Solutions/Answers:

References

Loading...

ERROR:UNABLE TO START DAEMON PROCESS — Gradle build in Android Studio 1.0

Loading...

ERROR:UNABLE TO START DAEMON PROCESS — Gradle build in Android Studio 1.0

Error:Unable to start the daemon process.

This problem might be caused by incorrect configuration of the daemon.
For example, 
An unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
13:41:17.232 [main] DEBUG o.g.l.daemon.bootstrap.DaemonMain - Assuming the daemon was started with following jvm opts: [-XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=x-windows-949, -Duser.country=KR, -Duser.language=ko, -Duser.variant]

This error occurs while Building or Making new project.

Solutions/Answers:

References

Loading...