无法在Android studio中运行项目:ZipException:重复条目

时间:2015-04-30 10:22:04

标签: android android-intent

我已经完成了project..clean和Rebuild在Android工作室中正常运行但是当我要运行它时会显示以下错误消息:

  

java.util.zip.ZipException:重复条目:com / squareup / picasso / Action $ RequestWeakReference.class exception ..

我试过了:

  

配置{all * .exclude group:'com.android.support',module:'support-v4'}

但没有解决。如何解决这个问题?

buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
  }

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
  }
 }
 apply plugin: 'com.android.application'
 apply plugin: 'io.fabric'

 repositories {
  maven { url 'https://maven.fabric.io/public' }
 }

 android {
 compileSdkVersion 22
 buildToolsVersion "22.0.1"
 defaultConfig {
    applicationId "myid"
    minSdkVersion 9
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
 }

 buildTypes {
     release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
     }
 }

  compileOptions {
     sourceCompatibility JavaVersion.VERSION_1_7
     targetCompatibility JavaVersion.VERSION_1_7
  }
 }

  dependencies {
 compile fileTree(dir: 'libs', include: ['*.jar'])
 compile files('libs/picasso-2.5.2.jar')
 compile 'com.android.support:appcompat-v7:22.1.1'
 compile 'com.google.android.gms:play-services:7.0.0'
 compile 'com.facebook.android:facebook-android-sdk:4.0.0'
 compile files('libs/universal-image-loader-1.9.0.jar')
 compile('com.twitter.sdk.android:twitter:1.4.0@aar') {
     transitive = true;
  }
}

1 个答案:

答案 0 :(得分:1)

您要添加两次毕加索图书馆,删除compile fileTree(dir: 'libs', include: ['*.jar'])compile files('libs/picasso-2.5.2.jar'),它应该有效。

希望这有帮助!