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.
Related
When adding This repository in in my Gradle get an error.
i try to build to cloud and got this error
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.mkurbanov.future"
minSdkVersion 14
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'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.google.firebase:firebase-core:16.0.1'
compile 'com.google.firebase:firebase-storage:16.0.4'
compile 'com.firebaseui:firebase-ui-storage:4.1.0'
}
apply plugin: 'com.google.gms.google-services'*
The error:
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugAndroidTestSources]
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareAndroidArchCoreRuntime110Library UP-TO-DATE
:app:prepareAndroidArchLifecycleLivedataCore110Library UP-TO-DATE
:app:prepareAndroidArchLifecycleRuntime110Library UP-TO-DATE
:app:prepareAndroidArchLifecycleViewmodel110Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2711Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2711Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2711Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2711Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2711Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42711Library UP-TO-DATE
:app:prepareComFirebaseuiFirebaseUiStorage410Library UP-TO-DATE
:app:prepareComGithubBumptechGlideGifdecoder471Library UP-TO-DATE
:app:prepareComGithubBumptechGlideGlide471Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAdsIdentifier1501Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase1601Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement1601Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurementBase1600Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesStats1501Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTasks1601Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalytics1601Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1611Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCommon1603Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCore1601Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIid1600Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIidInterop1600Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseMeasurementConnector1600Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseMeasurementConnectorImpl1601Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseStorage1604Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Parsing json file: C:\Users\admin\AndroidStudioProjects\Future\app\google-services.json
:app:generateDebugResources
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest
C:\Users\admin\AndroidStudioProjects\Future\app\src\main\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library [com.firebaseui:firebase-ui-storage:4.1.0] C:\Users\admin\AndroidStudioProjects\Future\app\build\intermediates\exploded-aar\com.firebaseui\firebase-ui-storage\4.1.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.firebase.ui.storage" to force usage
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library [com.firebaseui:firebase-ui-storage:4.1.0] C:\Users\admin\AndroidStudioProjects\Future\app\build\intermediates\exploded-aar\com.firebaseui\firebase-ui-storage\4.1.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.firebase.ui.storage" to force usage
Information:BUILD FAILED
Information:Total time: 15.324 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
Build script:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The error and how to solve it are written in your stacktrace:
uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library [com.firebaseui:firebase-ui-storage:4.1.0] C:\Users\admin\AndroidStudioProjects\Future\app\build\intermediates\exploded-aar\com.firebaseui\firebase-ui-storage\4.1.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.firebase.ui.storage" to force usage
now such a mistake:
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\admin\AppData\Local\Android\sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1
It's my first time using the Firebase, I've walked with each step in the video and document provided by Firebase for android, but I am facing this error when i run my project.
Information:Gradle tasks [:app:assembleDebug]
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2421Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2520Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2520Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2520Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2520Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2520Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42520Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement1180Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasementLicense1180Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTasks1180Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTasksLicense1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalytics1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalyticsImplLicense1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalyticsLicense1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCommon1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCommonLicense1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCore1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseFirestore1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIid1180Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIidLicense1180Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Parsing json file: C:\Users\myPc\AndroidStudioProjects\Try\app\google-services.json
:app:generateDebugResources
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:prePackageMarkerForDebug
:app:transformClassesWithDexForDebug
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
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug FAILED
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.squareup.okhttp/okhttp/pom.xml
File1: C:\Users\myPc\.gradle\caches\modules-2\files- 2.1\com.squareup.okhttp\okhttp\2.7.2\20f6463eb19ac61960c5d91a094c2f4f0727dc2e\okhttp-2.7.2.jar
File2: C:\Users\myPc\AndroidStudioProjects\Try\app\build\intermediates\exploded-aar\com.google.firebase\firebase-firestore\11.8.0\jars\classes.jar
Information:BUILD FAILED
Information:Total time: 1 mins 1.894 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
I have added the path and dependencies required:
This is my build.gradle(project:Try)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and this is my build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.salmasamy.trytrytry"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
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:24.2.1'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-firestore:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
I have also added the google-services.json file in project->app folder and made sure there was no extra spaces, and that I have google play services and google repository with the right versions.
When I build the project everything is okay, but I get this only when I run it.
because you should use gradle 3.+
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.1'
}
}
allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
}
}
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'
My gradle is
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.tbkha"
minSdkVersion 14
targetSdkVersion 23
versionCode 2
versionName "1.0.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
maven {
url 'http://swisscodemonkeys.github.io/appbrain-sdk/maven'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.github.nirhart:parallaxscroll:1.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.appbrain:appbrain-applift-sdk:10.51'
compile 'com.android.support:multidex:1.0.1'
}
I face this problem:
Information:Gradle tasks [:tbkha:assembleDebug]
:tbkha:preBuild UP-TO-DATE
:tbkha:preDebugBuild UP-TO-DATE
:tbkha:checkDebugManifest
:tbkha:preReleaseBuild UP-TO-DATE
:tbkha:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:tbkha:prepareComAndroidSupportCardviewV72311Library UP-TO-DATE
:tbkha:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:tbkha:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE
:tbkha:preDebugAndroidTestBuild UP-TO-DATE
:tbkha:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:tbkha:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:tbkha:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:tbkha:prepareComFacebookAndroidFacebookAndroidSdk410Library UP-TO-DATE
:tbkha:prepareComGithubNirhartParallaxscroll10Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServices840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAds840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAppstate840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesCast840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesDrive840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesFitness840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesGames840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesIdentity840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesNearby840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesPanorama840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesPlus840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesVision840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesWallet840Library UP-TO-DATE
:tbkha:prepareComGoogleAndroidGmsPlayServicesWearable840Library UP-TO-DATE
:tbkha:prepareDeHdodenhofCircleimageview130Library UP-TO-DATE
:tbkha:prepareDebugDependencies
:tbkha:compileDebugAidl UP-TO-DATE
:tbkha:compileDebugRenderscript UP-TO-DATE
:tbkha:generateDebugBuildConfig UP-TO-DATE
:tbkha:generateDebugAssets UP-TO-DATE
:tbkha:mergeDebugAssets UP-TO-DATE
:tbkha:generateDebugResValues UP-TO-DATE
:tbkha:generateDebugResources UP-TO-DATE
:tbkha:mergeDebugResources UP-TO-DATE
:tbkha:processDebugManifest UP-TO-DATE
:tbkha:processDebugResources UP-TO-DATE
:tbkha:generateDebugSources UP-TO-DATE
:tbkha:compileDebugJavaWithJavac UP-TO-DATE
:tbkha:compileDebugNdk UP-TO-DATE
:tbkha:compileDebugSources UP-TO-DATE
:tbkha:transformClassesWithJarMergingForDebug UP-TO-DATE
:tbkha:collectDebugMultiDexComponents UP-TO-DATE
:tbkha:transformClassesWithMultidexlistForDebug UP-TO-DATE
:tbkha:transformClassesWithDexForDebug
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
Error:Execution failed for task ':tbkha: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.8.0_65\bin\java.exe'' finished with non-zero exit value 3
Information:BUILD FAILED
Information:Total time: 4 mins 38.558 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
Thanks all,
I solved this problem by this steps:
1- add (org.gradle.jvmargs=-Xmx1024m) Inside my_project/gradle/wrapper/gradle-wrapper.properties
2- add (dexOptions { javaMaxHeapSize "4g" }) to build.gradle.
This problem is solved.
It takes a lot of memory to dex all that java code, and considering you have a lot of dependencies it looks likes you need a lot more! Increase the memory available to your Gradle process.
Inside your project/gradle/wrapper/gradle-wrapper.properties
add this line
org.gradle.jvmargs=-Xmx1024m
For instance it could look like this:
See here for more: https://docs.gradle.org/current/userguide/build_environment.html
org.gradle.jvmargs
Specifies the jvmargs used for the daemon process. The setting is particularly useful for tweaking memory settings. At the moment the default settings are pretty generous with regards to memory.
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.