Runtime error in Android application for task ': app: dexDebug'

I am new to android studio and am making a simple weather app. I wrote the code, but I still get this error:

Execution failed for task ': app: dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Handled 'command' / usr / lib / jvm / java-7-openjdk-amd64 / bin / java '' with non-zero value exit 2

Here is my build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.example.aseem.sunshine.app"
    minSdkVersion 10
    targetSdkVersion 22
    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 files('android-support-v7-appcompat.jar')
compile 'com.android.support:appcompat-v7:+'

}

      

Can anyone help me solve this error and run the program?

+3


source to share


1 answer


Library

com.android.support:appcompat-v7

included in your project twice. Remove this line compile files('android-support-v7-appcompat.jar')

from build.gradle

. Also you can remove this .jar from your project.



0


source







All Articles