I am tired of resolving this error since 2-3 hours. Please help me out of this.
So, I have following dependencies in my build.gradle(module:app) file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.corpchat"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.github.johnkil.android-robototextview:robototextview:2.4.0'
compile 'com.android.support:design:23.0.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.github.clans:fab:1.6.0'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'org.igniterealtime.smack:smack-android:4.1.3'
compile 'org.igniterealtime.smack:smack-bosh:4.1.3'
compile 'org.igniterealtime.smack:smack-tcp:4.1.3'
compile 'org.igniterealtime.smack:smack-im:4.1.3'
compile 'org.jxmpp:jxmpp-jid:0.5.0-alpha6'
compile 'org.igniterealtime.smack:smack-extensions:4.1.3'
compile 'com.android.support:support-v4:23.0.1'
compile files('libs/volley-1.0-SNAPSHOT.jar')
compile project(':emoji')
compile 'com.cocosw:bottomsheet:1.2.0'
// compile 'org.apache.httpcomponents:httpcore:4.4.3'
// compile 'org.apache.httpcomponents:httpmime:4.5.1'
compile('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: 'httpclient'
}
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
}
build.gradle(module:corpchat):
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
// classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:1.4.0-beta3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
I am having the following error while I run the project:
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.3 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.3 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:emoji:preBuild UP-TO-DATE
:emoji:preReleaseBuild UP-TO-DATE
:emoji:compileReleaseNdk UP-TO-DATE
:emoji:compileLint
:emoji:copyReleaseLint UP-TO-DATE
:emoji:mergeReleaseProguardFiles UP-TO-DATE
:emoji:checkReleaseManifest
:emoji:prepareReleaseDependencies
:emoji:compileReleaseAidl UP-TO-DATE
:emoji:compileReleaseRenderscript UP-TO-DATE
:emoji:generateReleaseBuildConfig UP-TO-DATE
:emoji:generateReleaseAssets UP-TO-DATE
:emoji:mergeReleaseAssets UP-TO-DATE
:emoji:generateReleaseResValues UP-TO-DATE
:emoji:generateReleaseResources UP-TO-DATE
:emoji:packageReleaseResources UP-TO-DATE
:emoji:processReleaseManifest UP-TO-DATE
:emoji:processReleaseResources UP-TO-DATE
:emoji:generateReleaseSources UP-TO-DATE
:emoji:compileReleaseJavaWithJavac UP-TO-DATE
:emoji:processReleaseJavaRes UP-TO-DATE
:emoji:packageReleaseJar UP-TO-DATE
:emoji:packageReleaseJniLibs UP-TO-DATE
:emoji:packageReleaseLocalJar UP-TO-DATE
:emoji:packageReleaseRenderscript UP-TO-DATE
:emoji:bundleRelease UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2301Library UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComCocoswBottomsheet120Library UP-TO-DATE
:app:prepareComGithubClansFab160Library UP-TO-DATE
:app:prepareComGithubJohnkilAndroidRobototextviewRobototextview240Library UP-TO-DATE
:app:prepareCorpChatEmojiUnspecifiedLibrary UP-TO-DATE
:app:prepareDeHdodenhofCircleimageview130Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:prepareComAndroidSupportMultidexInstrumentation101Library UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets UP-TO-DATE
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:generateDebugAndroidTestSources UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesAndResourcesWithExtractJarsForDebug
CHANGED: /home/chintan/Projects/CorpChat/app/build/intermediates/exploded-aar/com.android.support/multidex/1.0.1/jars/classes.jar
:app:transformClassesWithJarMergingForDebug FAILED
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/http/io/HttpMessageParserFactory.class
Information:BUILD FAILED
Information:Total time: 5.101 secs
Information:1 error
Information:6 warnings
Information:See complete output in console
Please help me. Thanks.
Related
I have a android project of e-commerce app. It is published on also app store. I have updated some thing in my app like com.google.android.gms:play-services:8.3.0 to com.google.android.gms:play-services:9.0.0. After that when i run app on local device its run perfact but when i generated Signed Apk this give error like below
Information:Gradle tasks [:app:assembleRelease]
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:niceSpinner:preBuild UP-TO-DATE
:niceSpinner:preReleaseBuild UP-TO-DATE
:niceSpinner:compileReleaseNdk UP-TO-DATE
:niceSpinner:compileLint
:niceSpinner:copyReleaseLint UP-TO-DATE
:niceSpinner:checkReleaseManifest
:niceSpinner:preDebugAndroidTestBuild UP-TO-DATE
:niceSpinner:preDebugBuild UP-TO-DATE
:niceSpinner:preDebugUnitTestBuild UP-TO-DATE
:niceSpinner:preReleaseUnitTestBuild UP-TO-DATE
:niceSpinner:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:niceSpinner:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:niceSpinner:prepareReleaseDependencies
:niceSpinner:compileReleaseAidl UP-TO-DATE
:niceSpinner:compileReleaseRenderscript UP-TO-DATE
:niceSpinner:generateReleaseBuildConfig UP-TO-DATE
:niceSpinner:mergeReleaseShaders UP-TO-DATE
:niceSpinner:compileReleaseShaders UP-TO-DATE
:niceSpinner:generateReleaseAssets UP-TO-DATE
:niceSpinner:mergeReleaseAssets UP-TO-DATE
:niceSpinner:generateReleaseResValues UP-TO-DATE
:niceSpinner:generateReleaseResources UP-TO-DATE
:niceSpinner:mergeReleaseResources UP-TO-DATE
:niceSpinner:processReleaseManifest UP-TO-DATE
:niceSpinner:processReleaseResources UP-TO-DATE
:niceSpinner:generateReleaseSources UP-TO-DATE
:niceSpinner:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:niceSpinner:compileReleaseJavaWithJavac UP-TO-DATE
:niceSpinner:extractReleaseAnnotations UP-TO-DATE
:niceSpinner:mergeReleaseProguardFiles UP-TO-DATE
:niceSpinner:packageReleaseRenderscript UP-TO-DATE
:niceSpinner:packageReleaseResources UP-TO-DATE
:niceSpinner:processReleaseJavaRes UP-TO-DATE
:niceSpinner:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:niceSpinner:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:niceSpinner:mergeReleaseJniLibFolders UP-TO-DATE
:niceSpinner:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:niceSpinner:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:niceSpinner:bundleRelease UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72340Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72321Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2340Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72340Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42340Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE
:app:prepareComBignerdranchAndroidExpandablerecyclerview203Library UP-TO-DATE
:app:prepareComDaimajiaSliderLibrary115Library UP-TO-DATE
:app:prepareComDaimajiaSwipelayoutLibrary120Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk450Library UP-TO-DATE
:app:prepareComGithubShellSoftwareFab112Library UP-TO-DATE
:app:prepareComGithubShellSoftwareUitools110Library UP-TO-DATE
:app:prepareComGithubShellSoftwareViewmover110Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAdsLite900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuthBase900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIid900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTagmanager900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTagmanagerApi900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTasks900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet900Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalytics900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAuth900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAuthCommon900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAuthModule900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCommon900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseConfig900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCore900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCrash900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseDatabase900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseDatabaseConnection900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIid900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseMessaging900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseStorage900Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseStorageCommon900Library UP-TO-DATE
:app:prepareComIntuitSdpSdpAndroid102Library UP-TO-DATE
:app:prepareComMakeramenRoundedimageview221Library UP-TO-DATE
:app:prepareComMarshalchenUltimaterecyclerviewLibrary0318Library UP-TO-DATE
:app:prepareComMiguelcatalanMaterialsearchview130Library UP-TO-DATE
:app:prepareComMikepenzActionitembadge318Library UP-TO-DATE
:app:prepareComMikepenzIconicsCore220Library UP-TO-DATE
:app:prepareComRengwuxianMaterialedittextLibrary203Library UP-TO-DATE
:app:prepareComWdullaerMaterialdatetimepicker202Library UP-TO-DATE
:app:prepareComWeiwangcnBetterspinnerLibraryMaterial110Library UP-TO-DATE
:app:prepareInSrainCubeUltraPtr1010Library UP-TO-DATE
:app:prepareNeedDepartmentalStoreNiceSpinnerUnspecifiedLibrary UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl
:app:compileReleaseRenderscript
:app:generateReleaseBuildConfig
:app:mergeReleaseShaders
:app:compileReleaseShaders
:app:generateReleaseAssets
:app:mergeReleaseAssets
:app:processReleaseManifest
:app:fabricGenerateResourcesRelease
:app:generateReleaseResValues UP-TO-DATE
:app:processReleaseGoogleServices
Parsing json file: /Users/dp/Desktop/current Project/NeedDepartmentalStore/app/google-services.json
:app:generateReleaseResources
:app:mergeReleaseResources
:app:processReleaseResources
:app:generateReleaseSources
:app:incrementalReleaseJavaCompilationSafeguard
:app:compileReleaseJavaWithJavac
:app:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources
:app:lintVitalRelease
:app:prePackageMarkerForRelease
:app:transformClassesWithJarMergingForRelease
:app:collectReleaseMultiDexComponents
:app:transformClassesWithMultidexlistForRelease
ProGuard, version 5.2.1
Reading program jar [/Users/dp/Desktop/current Project/NeedDepartmentalStore/app/build/intermediates/transforms/jarMerging/release/jars/1/1f/combined.jar]
Reading library jar [/Users/dp/Library/Android/sdk/build-tools/23.0.3/lib/shrinkedAndroid.jar]
Preparing output jar [/Users/dp/Desktop/current Project/NeedDepartmentalStore/app/build/intermediates/multi-dex/release/componentClasses.jar]
Copying resources from program jar [/Users/dp/Desktop/current Project/NeedDepartmentalStore/app/build/intermediates/transforms/jarMerging/release/jars/1/1f/combined.jar]
:app:transformClassesWithDexForRelease
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
Error:UNEXPECTED TOP-LEVEL ERROR:
Error:java.lang.OutOfMemoryError: GC overhead limit exceeded
Error: at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)
Error: at java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:393)
Error: at java.util.zip.ZipFile.getInputStream(ZipFile.java:374)
Error: at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:270)
Error: at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
Error: at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
Error: at com.android.dx.command.dexer.Main.processOne(Main.java:672)
Error: at com.android.dx.command.dexer.Main.processAllFiles(Main.java:569)
Error: at com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)
Error: at com.android.dx.command.dexer.Main.run(Main.java:275)
Error: at com.android.dx.command.dexer.Main.main(Main.java:245)
Error: at com.android.dx.command.Main.main(Main.java:106)
:app:transformClassesWithDexForRelease FAILED
Error:Execution failed for task ':app:transformClassesWithDexForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java'' finished with non-zero exit value 3
Information:BUILD FAILED
Information:Total time: 4 mins 2.184 secs
Information:15 errors
Information:0 warnings
Information:See complete output in console
Below is app.gradle file
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 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.dp.needdepartmentalstore"
minSdkVersion 14
targetSdkVersion 23
versionCode 28
versionName "5.15"
multiDexEnabled true
manifestPlaceholders = [manifestApplicationId : "${applicationId}",
onesignal_app_id : "16c778cf-8ebc-47a8-9ba8-6815f0223a0e",
onesignal_google_project_number: "253919422974"]
}
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.mikepenz:actionitembadge:3.1.8#aar') {
transitive = true
}
compile('com.weiwangcn.betterspinner:library-material:1.1.0') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
compile project(':niceSpinner')
compile files('libs/PGSDK_v1.0.jar')
compile files('libs/App42_ANDROID_SDK_3.8.jar')
// compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
// transitive = true;
// }
// compile('com.instabug.library:instabugsupport:1+') {
// exclude group: 'com.mcxiaoke.volley', module: 'library'
// }
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.daimajia.slider:library:1.1.5#aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile 'com.bignerdranch.android:expandablerecyclerview:2.0.3'
compile 'com.marshalchen.ultimaterecyclerview:library:0.3.18'
compile 'com.miguelcatalan:materialsearchview:1.3.0'
compile 'com.wdullaer:materialdatetimepicker:2.0.2'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.github.shell-software:fab:1.1.2'
compile 'com.google.android.gms:play-services-analytics:9.0.0'
//compile 'com.onesignal:OneSignal:2.+#aar'
compile 'com.daimajia.swipelayout:library:1.2.0#aar'
compile 'com.intuit.sdp:sdp-android:1.0.2'
compile 'com.google.android.gms:play-services-maps:9.0.0'
}
apply plugin: 'com.google.gms.google-services'
below is my high level gradle file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.google.gms:google-services:3.0.0'
// 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
}
I can not solve this error. Please help to resolve this error
Can you try this,
Add this in your app.gradle file inside android tag and try
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
Original answer by Scott Barta
The solution is in your error text.
To run dex in process, the Gradle daemon needs a larger heap. It
currently has approximately 910 MB. For faster builds, increase the
maximum heap size for the Gradle daemon to more than 2048 MB. To do
this set org.gradle.jvmargs=-Xmx2048M in the project
gradle.properties.
I get the following error when I try to run the project in Android studio.I have recently added Butterknife dependency in gradle.After adding I get the following error.Please help me!!!I have included the error and the gradle file below.
Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.example.jobinsabu.destination"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
// ...
maven {url "https://jitpack.io"}
maven {url 'http://yanzm.github.io/MaterialTabHost/repository'}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.prolificinteractive:material-calendarview:1.2.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.flaviofaria:kenburnsview:1.0.7'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.github.jd-alexander:library:1.1.0'
compile 'se.walkercrou:google-places-api-java:2.1.2'
compile 'com.github.ganfra:material-spinner:1.1.1'
compile 'io.nlopez.smartlocation:library:3.2.1'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:cardview-v7:23.0.+'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
compile ('com.github.ozodrukh:CircularReveal:1.3.1#aar') {
transitive = true;
}
compile 'com.ogaclejapan.smarttablayout:library:1.6.0#aar'
compile ('com.github.florent37:materialviewpager:1.1.3#aar'){
transitive = true
}
compile 'com.rengwuxian.materialedittext:library:2.1.4'
}
Error:
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Warning:Dependency org.json:json:20140107 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.5 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.json:json:20140107 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.5 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComGithubFlorent37Materialviewpager113Library UP-TO-DATE
:app:prepareComGithubGanfraMaterialSpinner111Library UP-TO-DATE
:app:prepareComGithubJdAlexanderLibrary110Library UP-TO-DATE
:app:prepareComGithubKsoichiroAndroidObservablescrollview152Library UP-TO-DATE
:app:prepareComGithubOzodrukhCircularReveal131Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable840Library UP-TO-DATE
:app:prepareComJpardogoMaterialtabstripLibrary110Library UP-TO-DATE
:app:prepareComMiguelcatalanMaterialsearchview140Library UP-TO-DATE
:app:prepareComOgaclejapanSmarttablayoutLibrary160Library UP-TO-DATE
:app:prepareComProlificinteractiveMaterialCalendarview120Library UP-TO-DATE
:app:prepareComRengwuxianMaterialedittextLibrary214Library UP-TO-DATE
:app:prepareIoNlopezSmartlocationLibrary321Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets UP-TO-DATE
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:generateDebugAndroidTestSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac
Note: E:\Destination\app\src\main\java\com\example\jobinsabu\destination\MainActivity.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:preDexDebug UP-TO-DATE
:app:dexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:484)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:261)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:473)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:161)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 6.905 secs
Information:1 error
Information:4 warnings
Information:See complete output in console
I am getting this error while running/building the APK of my application.
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild
:linkedin-sdk:preBuild
:app:preBuild UP-TO-DATE
:linkedin-sdk:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:linkedin-sdk:preReleaseBuild
:app:checkDebugManifest
:linkedin-sdk:preReleaseBuild UP-TO-DATE
:linkedin-sdk:compileReleaseNdk UP-TO-DATE
:app:preReleaseBuild
:linkedin-sdk:compileLint
:app:preReleaseBuild UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:linkedin-sdk:copyReleaseLint UP-TO-DATE
:app:generateDebugBuildConfig
:linkedin-sdk:checkReleaseManifest
:linkedin-sdk:preDebugAndroidTestBuild UP-TO-DATE
:linkedin-sdk:preDebugBuild UP-TO-DATE
:linkedin-sdk:preDebugUnitTestBuild UP-TO-DATE
:linkedin-sdk:preReleaseUnitTestBuild UP-TO-DATE
:linkedin-sdk:prepareComAndroidSupportSupportV42103Library
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
:linkedin-sdk:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
:linkedin-sdk:prepareReleaseDependencies
:linkedin-sdk:compileReleaseAidl
:app:compileDebugNdk UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:validateDebugSigning
:linkedin-sdk:compileReleaseAidl UP-TO-DATE
:linkedin-sdk:compileReleaseRenderscript UP-TO-DATE
:linkedin-sdk:generateReleaseBuildConfig UP-TO-DATE
:linkedin-sdk:generateReleaseAssets UP-TO-DATE
:linkedin-sdk:mergeReleaseAssets UP-TO-DATE
:linkedin-sdk:generateReleaseResValues UP-TO-DATE
:linkedin-sdk:generateReleaseResources UP-TO-DATE
:linkedin-sdk:mergeReleaseResources UP-TO-DATE
:linkedin-sdk:processReleaseManifest UP-TO-DATE
:linkedin-sdk:processReleaseResources UP-TO-DATE
:linkedin-sdk:generateReleaseSources UP-TO-DATE
:linkedin-sdk:compileReleaseJavaWithJavac UP-TO-DATE
:linkedin-sdk:extractReleaseAnnotations UP-TO-DATE
:linkedin-sdk:mergeReleaseProguardFiles UP-TO-DATE
:linkedin-sdk:packageReleaseRenderscript UP-TO-DATE
:linkedin-sdk:packageReleaseResources UP-TO-DATE
:linkedin-sdk:processReleaseJavaRes UP-TO-DATE
:linkedin-sdk:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:linkedin-sdk:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:linkedin-sdk:mergeReleaseJniLibFolders UP-TO-DATE
:linkedin-sdk:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:linkedin-sdk:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:linkedin-sdk:bundleRelease UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComAppyvetMaterialrangebar13Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk470Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable830Library UP-TO-DATE
:app:prepareComPkmmteViewCircularimageview11Library UP-TO-DATE
:app:prepareComShehabicDroppyDroppy0252Library UP-TO-DATE
:app:prepareComSplitwiseTokenautocomplete202Library UP-TO-DATE
:app:prepareComStripeStripeAndroid104Library UP-TO-DATE
:app:prepareTlandroidappLinkedinSdkUnspecifiedLibrary UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithJarMergingForDebug UP-TO-DATE
:app:collectDebugMultiDexComponents UP-TO-DATE
:app:transformClassesWithMultidexlistForDebug UP-TO-DATE
:app:transformClassesWithDexForDebug
Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
1 error; aborting
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 2 mins 18.454 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
I tried almost every solution available on internet but it was of no use. Here is my build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.truelancer.app"
minSdkVersion 19
targetSdkVersion 23
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
}
sourceSets { main { res.srcDirs = ['src/main/res', 'src/main/res/xml'] } }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.shehabic.droppy:Droppy:0.2.5.2#aar'
compile 'com.android.support:design:23.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.splitwise:tokenautocomplete:2.0.2#aar'
compile 'com.appyvet:materialrangebar:1.3'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile project(':linkedin-sdk')
compile 'com.stripe:stripe-android:+'
}
apply plugin: 'com.google.gms.google-services'
and here is the project level build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
The linkedIn library also has one gradle file and here it is:
allprojects {
repositories {
mavenCentral()
}
}
buildscript {
repositories {
mavenCentral()
}
}
apply plugin: 'android-library'
android {
sourceSets {
androidTest {
setRoot('src/test')
}
}
compileSdkVersion 17
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 8
targetSdkVersion 16
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
configurations {
}
dependencies {
compile 'com.android.support:support-annotations:20.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/volley.jar')
androidTestCompile('junit:junit:4.12')
}
Note: My app is Multidex application and I have already extended Multidex class.
Sorry for bothering you guys. Thanks for your concern and all the answers above. I solved it myself by adding in my gradle file.
dexOptions {
javaMaxHeapSize "4g"
}
There is a duplicate dependency in your build.gradle file
You have added
compile 'com.android.support:multidex:1.0.1'
twice in your build file. Remove one of them, clean your project and try rebuilding it. It should work fine.
This usually happens when you have duplicate dependencies added. You can do gradle dependencies command to see if there exist duplicates, and remove them easily.
You have 2 duplicate dependency :
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
remove analytics or services one. and also multidex one as you have written it twice
its because of you are using duplicate dependency
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.android.support:multidex:1.0.1'
remove
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.android.support:multidex:1.0.1'
I am getting this error, I dont remember how, but I guess after I made a series of updates to versions as below:
Android Studio 1.5 beta
Build tools 23.0.2
Support libraries 23.1.0
My gradle.build (app):
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.hsoni.corpchat"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.github.johnkil.android-robototextview:robototextview:2.4.0'
compile 'com.android.support:design:23.1.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.github.clans:fab:1.6.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'org.igniterealtime.smack:smack-android:4.1.3'
compile 'org.igniterealtime.smack:smack-bosh:4.1.3'
compile 'org.igniterealtime.smack:smack-tcp:4.1.3'
compile 'org.igniterealtime.smack:smack-im:4.1.3'
compile 'org.jxmpp:jxmpp-jid:0.5.0-alpha6'
compile 'org.igniterealtime.smack:smack-extensions:4.1.3'
compile 'com.android.support:support-v4:23.1.0'
compile files('libs/volley-1.0-SNAPSHOT.jar')
compile project(':emoji')
compile 'com.cocosw:bottomsheet:1.2.0'
compile project(':aFileChooser')
compile "com.google.android.gms:play-services:8.3.0"
}
Error Log:
Information:Gradle tasks [:app:assembleDebug]
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.3 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.3 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
:aFileChooser:preBuild UP-TO-DATE
:aFileChooser:preReleaseBuild UP-TO-DATE
:aFileChooser:compileReleaseNdk UP-TO-DATE
:aFileChooser:compileLint
:aFileChooser:copyReleaseLint UP-TO-DATE
:aFileChooser:checkReleaseManifest
:aFileChooser:preDebugAndroidTestBuild UP-TO-DATE
:aFileChooser:preDebugBuild UP-TO-DATE
:aFileChooser:preDebugUnitTestBuild UP-TO-DATE
:aFileChooser:preReleaseUnitTestBuild UP-TO-DATE
:aFileChooser:prepareComAndroidSupportSupportV42310Library UP-TO-DATE
:aFileChooser:prepareReleaseDependencies
:aFileChooser:compileReleaseAidl UP-TO-DATE
:aFileChooser:compileReleaseRenderscript UP-TO-DATE
:aFileChooser:generateReleaseBuildConfig UP-TO-DATE
:aFileChooser:generateReleaseAssets UP-TO-DATE
:aFileChooser:mergeReleaseAssets UP-TO-DATE
:aFileChooser:generateReleaseResValues UP-TO-DATE
:aFileChooser:generateReleaseResources UP-TO-DATE
:aFileChooser:mergeReleaseResources UP-TO-DATE
:aFileChooser:processReleaseManifest UP-TO-DATE
:aFileChooser:processReleaseResources UP-TO-DATE
:aFileChooser:generateReleaseSources UP-TO-DATE
:aFileChooser:compileReleaseJavaWithJavac UP-TO-DATE
:aFileChooser:extractReleaseAnnotations UP-TO-DATE
:aFileChooser:mergeReleaseProguardFiles UP-TO-DATE
:aFileChooser:processReleaseJavaRes UP-TO-DATE
:aFileChooser:packageReleaseJar UP-TO-DATE
:aFileChooser:packageReleaseJniLibs UP-TO-DATE
:aFileChooser:packageReleaseLocalJar UP-TO-DATE
:aFileChooser:packageReleaseRenderscript UP-TO-DATE
:aFileChooser:packageReleaseResources UP-TO-DATE
:aFileChooser:bundleRelease UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:emoji:preBuild UP-TO-DATE
:emoji:preReleaseBuild UP-TO-DATE
:emoji:compileReleaseNdk UP-TO-DATE
:emoji:compileLint
:emoji:copyReleaseLint UP-TO-DATE
:emoji:checkReleaseManifest
:emoji:preDebugAndroidTestBuild UP-TO-DATE
:emoji:preDebugBuild UP-TO-DATE
:emoji:preDebugUnitTestBuild UP-TO-DATE
:emoji:preReleaseUnitTestBuild UP-TO-DATE
:emoji:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:emoji:prepareReleaseDependencies
:emoji:compileReleaseAidl UP-TO-DATE
:emoji:compileReleaseRenderscript UP-TO-DATE
:emoji:generateReleaseBuildConfig UP-TO-DATE
:emoji:generateReleaseAssets UP-TO-DATE
:emoji:mergeReleaseAssets UP-TO-DATE
:emoji:generateReleaseResValues UP-TO-DATE
:emoji:generateReleaseResources UP-TO-DATE
:emoji:mergeReleaseResources UP-TO-DATE
:emoji:processReleaseManifest UP-TO-DATE
:emoji:processReleaseResources UP-TO-DATE
:emoji:generateReleaseSources UP-TO-DATE
:emoji:compileReleaseJavaWithJavac UP-TO-DATE
:emoji:extractReleaseAnnotations UP-TO-DATE
:emoji:mergeReleaseProguardFiles UP-TO-DATE
:emoji:processReleaseJavaRes UP-TO-DATE
:emoji:packageReleaseJar UP-TO-DATE
:emoji:packageReleaseJniLibs UP-TO-DATE
:emoji:packageReleaseLocalJar UP-TO-DATE
:emoji:packageReleaseRenderscript UP-TO-DATE
:emoji:packageReleaseResources UP-TO-DATE
:emoji:bundleRelease UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72310Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72310Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2310Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72310Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42310Library UP-TO-DATE
:app:prepareComCocoswBottomsheet120Library UP-TO-DATE
:app:prepareComGithubClansFab160Library UP-TO-DATE
:app:prepareComGithubJohnkilAndroidRobototextviewRobototextview240Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet830Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable830Library UP-TO-DATE
:app:prepareCorpChatAFileChooserUnspecifiedLibrary UP-TO-DATE
:app:prepareCorpChatEmojiUnspecifiedLibrary UP-TO-DATE
:app:prepareDeHdodenhofCircleimageview130Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Found com.google.android.gms:play-services:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services:8.3.0, but version 8.1.0 is needed
:app:processDebugGoogleServices FAILED
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict.
Information:BUILD FAILED
Information:Total time: 2.226 secs
Information:1 error
Just set in main gradle file :
dependencies {
...
classpath 'com.google.gms:google-services:1.5.0-beta2'
}
I have faced this type of error many time when I was working in Firebase authentication, finally I solved and when I was searching I got your post first, so I just wanna post my solution even if you solved it before because other might see your post first.
Here, tou can see error which I got:
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the
google-services plugin (information about the latest version is available at
https://bintray.com/android/android-tools/com.google.gms.google-services/)
or updating the version of com.google.android.gms to 11.8.0.
Here is the build.gradle (app level)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "idoston.com.firebaseauthenticationandroid"
minSdkVersion 17
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-auth:11.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.1'
compile 'com.android.support:percent:26.1.0'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.firebaseui:firebase-ui-auth:3.2.2'
}
apply plugin: 'com.google.gms.google-services'
Solution is that : you need to delete which is in the last line:
apply plugin: 'com.google.gms.google-services'
I hope this answer will probably help someone in the future.
I'm trying to implement Google sign in for Android and I'm following the instructoins via
https://developers.google.com/identity/sign-in/android/start-integrating
But while building the application I'm receiving the following error.
Information:Gradle tasks [:app:generateDebugSources,
:app:generateDebugAndroidTestSources, :app:assembleDebug]
:app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library
UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBase810Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement810Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity810Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement810Library
UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesPlus810Library
UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl
UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets
UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE :app:processDebugGoogleServices
No matching client found for package name 'com.questo.rugved.questo'
:app:generateDebugResources :app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE :app:processDebugResources
UP-TO-DATE :app:generateDebugSources UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets UP-TO-DATE
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:generateDebugAndroidTestSources UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE :app:compileDebugNdk
UP-TO-DATE :app:compileDebugSources UP-TO-DATE
:app:transformClassesAndResourcesWithExtractJarsForDebug
:app:transformClassesWithDexForDebug UNEXPECTED TOP-LEVEL EXCEPTION:
Error:Execution failed for task
':app:transformClassesWithDexForDebug'.
com.android.build.transform.api.TransformException:
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command
'/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit
value 2 Information:BUILD FAILED Information:Total time: 1 mins 39.994
secs Information:1 error Information:0 warnings Information:See
complete output in console
My top level gradle is
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:1.4.0-beta3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
My app level gradle is
<pre>
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.questo.rugved.questo"
minSdkVersion 15
targetSdkVersion 23
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:23.0.1'
compile 'com.android.support:design:23.+'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'
}
please help.
Maybe this link helps you. link
That helped me:
android {
...
defaultConfig {
...
multiDexEnabled true
}
}
This problem occurs because of multiple inclusion of dependencies. You are including a dependency that is already specified in your build.gradle file. For example:
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.google.android.gms:play-services-identity:9.0.2'
the above specification of dependency will generate this problem, because play-services includes everything, including play-services-identity, & so, here the same dependency is included for multiple times.
The recommended option is to only include those dependencies that you actually need. If you need play services location & maps, only include these dependencies as:
compile 'com.google.android.gms:play-services-location:9.0.2'
compile 'com.google.android.gms:play-services-maps:9.0.2'
Without including everything with 'com.google.android.gms:play-services:9.0.2'.
In your specific case, I suspect the conflict is arising between google-services of the top level gradle file and play-services-identity & play-services-plus in the app level gradle file. Using only those services that you specifically need resolving multiple inclusion will resolve your issue.
In general, you should not use "multiDexEnabled true" if you don't have a strong & legitimate reason. Using it without knowing the actual problem means that you are bypassing a problem. You are allowing multiple overlapping dependencies yielding a potential source of api conflicts & bigger apk size.
Adding
dexOptions {
incremental = true;
preDexLibraries = false
javaMaxHeapSize "4g" // 2g should be also OK
}
in with in android in build.gradle works for me.
Had the same problem.
Mine was fixed by setting the JAVA_HOME variable to java 8 jdk
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"