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
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments