java.util.zip.ZipException:重复项:AbstractHttpContent.class [英] java.util.zip.ZipException: duplicate entry: AbstractHttpContent.class

查看:143
本文介绍了java.util.zip.ZipException:重复项:AbstractHttpContent.class的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到了作为app引擎一部分的abstractHttpContent.class的重复输入错误。

我正在使用谷歌应用程序引擎后端。我也有multidex启用,没有multidex它给我一个方法超出的错误。



这是我的应用程序gradle文件

  apply plugin:'com .android.application'
apply plugin:'com.google.gms.google-services'

android {
compileSdkVersion 23
buildToolsVersion23.0.2


defaultConfig {
applicationIdcom.example.joseph.googlesign_in
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName 1.0
multiDexEnabled true
}

dexOptions {
javaMaxHeapSize4g
}

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


依赖关系{
编译fileTree(dir:'libs',include:['* .jar'])
testCompile'junit:junit:4.12'
编译'com.androi d.support:appcompat-v7:23.1.1'
compile'c​​om.google.android.gms:play-services-auth:8.3.0'
compile project(path:':gsiBackend', (':gsiBackend')
}

这是我的后端gradle文件

  buildscript {
repositories {
jcenter()
}
依赖项{
classpath'com.google.appengine:gradle-appengine-plugin:1.9.18'
}
}

存储库{
jcenter();
}

apply plugin:'java'
apply plugin:'war'
apply plugin:'appengine'

sourceCompatibility = JavaVersion .VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

依赖项{
appengineSdk'com.google.appengine:appengine-java-sdk:1.9.18'
compile'c​​om .google.appengine:appengine-endpoints:1.9.18'
compile'c​​om.google.appengine:appengine-endpoints-deps:1.9.18'
compile'javax.servlet:servlet-api:2.5 '
}

appengine {
downloadSdk = true
appcfg {
oauth2 = true
}
端点{
getClientLibsOnBuild = true
getDiscoveryDocsOnBuild = true
}
}

abstractHttpContent.class 的位置



看起来错误开始添加谷歌播放服务后使用谷歌登录。

Has任何人遇到此构建错误?关于如何解决它的任何建议?

谢谢

解决方案

在我们讨论的时候,我相信 Google Play服务8.3 对Google登录系统进行了一些更改。您可以在这里查看:
https://developers.google.com / android / guides / releases#november_2015 _-_ v83



所以我建议你可以尝试使用 version 8.1

问题出在Google Play服务。

这是顶层gradle文件

  buildscript {
repositories {
jcenter()
}
依赖关系{
classpath'com.android。 tools.build:gradle:1.5.0'
classpath'com.google.gms:google-services:1.5.0-beta2'

//注意:不要放置应用程序依赖关系这里;它们属于单个模块build.gradle文件中的
//
}
}

allprojects {
存储库{
jcenter()



任务清理(类型:删除){
删除rootProject.buildDir
}

更改以下


  classpath 'com.google.gms:google-services:1.5.0-beta2'

  classpath'com.google.gms:google-services:1.5.0'

此外,aapt.exe超时并显示错误。

运行appt.exe文件以确保它正在运行,并且所有内容似乎正在工作。



试图在禁用mulidex的情况下运行应用程序,它仍然有效


I'm getting the duplicate entry error for abstractHttpContent.class which is part of app engine.

I'm using google app engine backend. I also have multidex enabled, without multidex it give me an method exceeded error.

here is my app gradle file

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"


    defaultConfig {
        applicationId "com.example.joseph.googlesign_in"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

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


dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.google.android.gms:play-services-auth:8.3.0'
    compile project(path: ':gsiBackend', configuration: 'android-endpoints')
    compile project(':gsiBackend')
}

Here is my backend gradle file

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.google.appengine:gradle-appengine-plugin:1.9.18'
    }
}

repositories {
    jcenter();
}

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

dependencies {
    appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.18'
    compile 'com.google.appengine:appengine-endpoints:1.9.18'
    compile 'com.google.appengine:appengine-endpoints-deps:1.9.18'
    compile 'javax.servlet:servlet-api:2.5'
}

appengine {
    downloadSdk = true
    appcfg {
        oauth2 = true
    }
    endpoints {
        getClientLibsOnBuild = true
        getDiscoveryDocsOnBuild = true
    }
}

The location of abstractHttpContent.class

It seems the error started after adding google play services to use google sign in.
Has anyone encountered this build error? Any advice on how to fix it?
Thanks

解决方案

As we discuss, I believe Google play services 8.3 made some changes on the google signin system. You can check out here: https://developers.google.com/android/guides/releases#november_2015_-_v83

So I suggest that you can try to use version 8.1.

The issue was with google play services.
Here is top level gradle file

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath 'com.google.gms:google-services:1.5.0-beta2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Change the following From

classpath 'com.google.gms:google-services:1.5.0-beta2'

To

classpath 'com.google.gms:google-services:1.5.0'  

Also the aapt.exe was timing out and displaying an error.
Ran the appt.exe file to make sure it was running and everything seems to be working now.

Tried to run the app with mulidex disabled and it still works

这篇关于java.util.zip.ZipException:重复项:AbstractHttpContent.class的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆