DBFlow - Gradle cannot find symbol DatabaseHolder when using multiple modules - android

i need help with a problem using DBFlow 4.0.0-beta3 and Gradle 2.2.3 in my module app of an Android Studio project; i have two modules (app, notifications) that uses DBFlow so i configure them like is indicated in the usage of the library, the notifications module compiles whell and generates the DatabaseHolder class, then the compiler goes to app and throws the exception:
error: cannot find symbol
import com.raizlabs.android.dbflow.config.SamsungGeneratedDatabaseHolder;
But that class is generated successfully, this is my gradle output:
Executing tasks: [clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources, :notifications:generateDebugSources, :notifications:generateDebugAndroidTestSources, :notifications:mockableAndroidJar, :notifications:prepareDebugUnitTestDependencies, :notifications:compileDebugSources, :notifications:compileDebugAndroidTestSources, :notifications:compileDebugUnitTestSources, :sapservice:generateDebugSources, :sapservice:generateDebugAndroidTestSources, :sapservice:mockableAndroidJar, :sapservice:prepareDebugUnitTestDependencies, :sapservice:compileDebugSources, :sapservice:compileDebugAndroidTestSources, :sapservice:compileDebugUnitTestSources]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:clean
:app:clean
:notifications:clean
:sapapi:clean
:sapprocessor:clean
:sapservice:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:notifications:preBuild UP-TO-DATE
:notifications:preReleaseBuild UP-TO-DATE
:notifications:checkReleaseManifest
:notifications:preDebugAndroidTestBuild UP-TO-DATE
:notifications:preDebugBuild UP-TO-DATE
:notifications:preDebugUnitTestBuild UP-TO-DATE
:notifications:preReleaseUnitTestBuild UP-TO-DATE
:notifications:prepareComAndroidSupportAnimatedVectorDrawable2511Library
:notifications:prepareComAndroidSupportAppcompatV72511Library
:notifications:prepareComAndroidSupportSupportCompat2511Library
:notifications:prepareComAndroidSupportSupportCoreUi2511Library
:notifications:prepareComAndroidSupportSupportCoreUtils2511Library
:notifications:prepareComAndroidSupportSupportFragment2511Library
:notifications:prepareComAndroidSupportSupportMediaCompat2511Library
:notifications:prepareComAndroidSupportSupportV42511Library
:notifications:prepareComAndroidSupportSupportVectorDrawable2511Library
:notifications:prepareComGithubRaizlabsDBFlowDbflow400Beta3Library
:notifications:prepareComGithubRaizlabsDBFlowDbflowKotlinextensions400Beta3Library
:notifications:prepareIoReactivexRxjava2Rxandroid201Library
:notifications:prepareNetDanlewAndroidJoda2942Library
:notifications:prepareReleaseDependencies
:notifications:compileReleaseAidl
:notifications:compileReleaseNdk UP-TO-DATE
:notifications:compileLint
:notifications:copyReleaseLint UP-TO-DATE
:notifications:compileReleaseRenderscript
:notifications:generateReleaseBuildConfig
:notifications:generateReleaseResValues
:notifications:generateReleaseResources
:notifications:mergeReleaseResources
:notifications:processReleaseManifest
:notifications:processReleaseResources
:notifications:generateReleaseSources
:notifications:incrementalReleaseJavaCompilationSafeguard
:notifications:compileReleaseKotlin
:notifications:compileReleaseJavaWithJavac
Destination for generated sources was modified by kapt. Previous value = /home/diego/Documents/development/mobile/android/samsung-club/notifications/build/generated/source/apt/release
:notifications:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
warning: File for type 'com.raizlabs.android.dbflow.config.NotificationsRegisterDatabaseNotificationsRegisterDatabase_Database' created in the last round will not be subject to annotation processing.
warning: File for type 'com.raizlabs.android.dbflow.config.NotificationsModuleGeneratedDatabaseHolder' created in the last round will not be subject to annotation processing.
2 warnings
:notifications:compileReleaseKotlinAfterJava
:notifications:copyReleaseKotlinClasses
:notifications:extractReleaseAnnotations
:notifications:mergeReleaseShaders
:notifications:compileReleaseShaders
:notifications:generateReleaseAssets
:notifications:mergeReleaseAssets
:notifications:mergeReleaseProguardFiles UP-TO-DATE
:notifications:packageReleaseRenderscript UP-TO-DATE
:notifications:packageReleaseResources
:notifications:processReleaseJavaRes UP-TO-DATE
:notifications:transformResourcesWithMergeJavaResForRelease
:notifications:transformClassesAndResourcesWithSyncLibJarsForRelease
:notifications:mergeReleaseJniLibFolders
:notifications:transformNative_libsWithMergeJniLibsForRelease
:notifications:transformNative_libsWithSyncJniLibsForRelease
:notifications:bundleRelease
:app:prepareComAndroidSupportAnimatedVectorDrawable2511Library
:app:prepareComAndroidSupportAppcompatV72511Library
:app:prepareComAndroidSupportCardviewV72511Library
:app:prepareComAndroidSupportDesign2511Library
:app:prepareComAndroidSupportMultidex101Library
:app:prepareComAndroidSupportPercent2511Library
:app:prepareComAndroidSupportRecyclerviewV72511Library
:app:prepareComAndroidSupportSupportCompat2511Library
:app:prepareComAndroidSupportSupportCoreUi2511Library
:app:prepareComAndroidSupportSupportCoreUtils2511Library
:app:prepareComAndroidSupportSupportFragment2511Library
:app:prepareComAndroidSupportSupportMediaCompat2511Library
:app:prepareComAndroidSupportSupportV42511Library
:app:prepareComAndroidSupportSupportVectorDrawable2511Library
:app:prepareComAndroidSupportTransition2511Library
:app:prepareComAppsflyerAfAndroidSdk467Library
:app:prepareComCrashlyticsSdkAndroidAnswers136Library
:app:prepareComCrashlyticsSdkAndroidBeta114Library
:app:prepareComCrashlyticsSdkAndroidCrashlytics255Library
:app:prepareComCrashlyticsSdkAndroidCrashlyticsCore238Library
:app:prepareComCrashlyticsSdkAndroidCrashlyticsNdk111Library
:app:prepareComDaimajiaSwipelayoutLibrary120Library
:app:prepareComFacebookAndroidFacebookAndroidSdk470Library
:app:prepareComGithubAfollestadMaterialDialogsCore0857Library
:app:prepareComGithubRaizlabsDBFlowDbflow400Beta3Library
:app:prepareComGithubRaizlabsDBFlowDbflowKotlinextensions400Beta3Library
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics961Library
:app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl961Library
:app:prepareComGoogleAndroidGmsPlayServicesBase961Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement961Library
:app:prepareComGoogleAndroidGmsPlayServicesGcm961Library
:app:prepareComGoogleAndroidGmsPlayServicesIid961Library
:app:prepareComGoogleAndroidGmsPlayServicesLocation961Library
:app:prepareComGoogleAndroidGmsPlayServicesMaps961Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks961Library
:app:prepareComGoogleFirebaseFirebaseAnalytics961Library
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl961Library
:app:prepareComGoogleFirebaseFirebaseCommon961Library
:app:prepareComGoogleFirebaseFirebaseCore961Library
:app:prepareComGoogleFirebaseFirebaseIid961Library
:app:prepareComGoogleMapsAndroidAndroidMapsUtils043Library
:app:prepareComKarumiDexter231Library
:app:prepareComTwitterSdkAndroidTweetComposer200Library
:app:prepareComTwitterSdkAndroidTweetUi200Library
:app:prepareComTwitterSdkAndroidTwitter200Library
:app:prepareComTwitterSdkAndroidTwitterCore200Library
:app:prepareIoFabricSdkAndroidFabric1313Library
:app:prepareIoReactivexRxandroid121Library
:app:prepareIoReactivexRxjava2Rxandroid201Library
:app:prepareMeZhanghaiAndroidMaterialprogressbarLibrary115Library
:app:prepareNetDanlewAndroidJoda2942Library
:app:prepareSamsungClubGeoreferencedpushnotificationsReleaseUnspecifiedLibrary
:app:prepareSamsungClubNotificationsUnspecifiedLibrary
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:processDebugManifest
:app:fabricGenerateResourcesDebug
:app:generateDebugResValues
:app:processDebugGoogleServices
Parsing json file: /home/diego/Documents/development/mobile/android/samsung-club/app/google-services.json
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugResources
:app:generateDebugSources
:app:mockableAndroidJar
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:generateDebugAndroidTestResValues
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac
/home/diego/Documents/development/mobile/android/samsung-club/app/src/main/java/com/creardigitalm/samsungclub/controller/fragment/MyBenefitsFragment.java:28: error: cannot find symbol
import com.raizlabs.android.dbflow.config.SamsungGeneratedDatabaseHolder;
^
symbol: class SamsungGeneratedDatabaseHolder
location: package com.raizlabs.android.dbflow.config
warning: File for type 'com.raizlabs.android.dbflow.config.SamsungClubDatabaseSamsungDB_Database' created in the last round will not be subject to annotation processing.
warning: File for type 'com.raizlabs.android.dbflow.config.SamsungGeneratedDatabaseHolder' created in the last round will not be subject to annotation processing.
1 error
2 warnings
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 17.914 secs
Like you can see the compiler try to find the import class and then generate the classes i will post my app gradle.build (i switch from apt to annotationProcessor):
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'org.aspectj:aspectjtools:1.8.5'
}
}
apply plugin: 'com.android.application'
//apply plugin: 'kotlin-android'
//apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
android {
compileSdkVersion 25
buildToolsVersion '24.0.1'
defaultConfig {
applicationId "com.creardigitalm.samsungclub"
minSdkVersion 18
targetSdkVersion 25
versionCode 69
versionName '1.5.5.0'
//multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = [ targetModuleName : 'Samsung']
}
}
}
buildTypes {
debug {
resValue("bool", "is_debug", "true")
}
release {
resValue("bool", "is_debug", "false")
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
packagingOptions {
//exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/rxjava.properties'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}
/*apt {
arguments {
targetModuleName 'Samsung'
}
}*/
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
/*---- GOOGLE SUPPORT LIBRARIES ----*/
// MATERIAL DESIGN
compile "com.android.support:appcompat-v7:$support_version"
compile "com.android.support:support-v4:$support_version"
compile "com.android.support:design:$support_version"
compile "com.android.support:cardview-v7:$support_version"
// PERCENT RELATIVE LAYOUT
compile "com.android.support:percent:${support_version}"
//MATERIAL DIALOGS
compile('com.github.afollestad.material-dialogs:core:0.8.5.7#aar') {
transitive = true
}
/*----------------------------------*/
//SWIPE LIST
// Swipe layout https://github.com/daimajia/AndroidSwipeLayout
compile "com.daimajia.swipelayout:library:1.2.0#aar"
//PICASSO
compile 'com.squareup.picasso:picasso:2.5.2'
/*------ DEPENDENCY INJECTION ------*/
// ButterKnife utils http://jakewharton.github.io/butterknife/
compile 'com.jakewharton:butterknife:7.0.1'
// Parceler https://github.com/johncarl81/parceler
compile 'org.parceler:parceler-api:1.1.4'
annotationProcessor 'org.parceler:parceler:1.1.4'
/*----------------------------------*/
/*------- REST - NETWORKING -------*/
// Retrofit http://square.github.io/retrofit/
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
// OkHttp http://square.github.io/okhttp/
compile 'com.squareup.okhttp3:okhttp:3.4.1'
/*----------------------------------*/
/*------------ GOOGLE --------------*/
//Google Map Utils.
compile 'com.google.maps.android:android-maps-utils:0.4.3'
//Google Cloud Message
compile 'com.google.android.gms:play-services-gcm:9.6.1'
//Google Location
compile 'com.google.android.gms:play-services-location:9.6.1'
//Google Maps
compile 'com.google.android.gms:play-services-maps:9.6.1'
//Google Analytics
compile 'com.google.android.gms:play-services-analytics:9.6.1'
/*----------------------------------*/
/*------------ FABRIC --------------*/
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.1#aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:answers:1.3.3#aar') {
transitive = true;
}
/*----------------------------------*/
/*----------- ANALYTICS ------------*/
//Appsflyer
compile 'com.appsflyer:af-android-sdk:4+#aar'
/*----------------------------------*/
/*------------ FACEBOOK ------------*/
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
/*----------------------------------*/
/*------------- TWITTER -------------*/
compile('com.twitter.sdk.android:twitter:2.0.0#aar') {
transitive = true;
}
/*----------------------------------*/
/*--------- GEO FENCED PUSH --------*/
compile project(':georeferencedpushnotifications-release')
/*compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile 'net.danlew:android.joda:2.9.4.2'
compile "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:$dbflow_version"*/
/*----------------------------------*/
/*---------- NOTIFICATIONS ---------*/
compile project(':notifications')
/*----------------------------------*/
/*------------ SECURITY ------------*/
// Dexter https://github.com/Karumi/Dexter
compile 'com.karumi:dexter:2.3.1'
/*----------------------------------*/
/*--------------- RX ---------------*/
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.2.1'
/*----------------------------------*/
/*------------ MULTIDEX ------------*/
compile 'com.android.support:multidex:1.0.1'
/*----------------------------------*/
/*-------------- DBFLOW ------------*/
annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:$dbflow_version"
compile "com.github.Raizlabs.DBFlow:dbflow-core:$dbflow_version"
compile "com.github.Raizlabs.DBFlow:dbflow:$dbflow_version"
/*----------------------------------*/
/*------- SAPAPI PARA GEAR S2 ------*/
/*compile project(':sapservice')
apt project(':sapprocessor')
compile 'org.aspectj:aspectjrt:1.8.5'*/
/*----------------------------------*/
}
apply plugin: 'com.google.gms.google-services'
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}

Related

Gradle Build taking too long too complete

My gradle build is taking over 9 minutes to complete.
It was taking about less than a minute before which was ok. I dont know what went wrong.
I have tried a lot of adjustments and recommendations.
Gradle 4.4
my project level gradle is as follows
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:3.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
My app gradle build file is as follows
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '27.0.3'
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
maxProcessCount 8
}
defaultConfig {
applicationId "com.teamnifi.nifi"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:26.1.0'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:support-vector-drawable:26.1.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation 'io.reactivex:rxandroid:1.2.0'
implementation 'io.reactivex:rxjava:1.1.8'
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation 'com.android.support:preference-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.github.nkzawa:socket.io-client:0.3.0'
//noinspection GradleCompatible
implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.firebaseui:firebase-ui-auth:4.0.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation "com.andkulikov:transitionseverywhere:1.8.0"
testImplementation 'junit:junit:4.12'
android {
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:27.1.1'
}
}
}
apply plugin: 'com.google.gms.google-services'
And my gradle project properties is as follows
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx4608m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide /multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
Offline work is selected in settings under gradle.
i have tried turning that off and syncing then turning it back on and building
The output off the latest build is as follows with offline work on in settings.
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
Parallel execution with configuration on demand is an incubating feature.
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
:clean UP-TO-DATE
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar UP-TO-DATE
:app:mainApkListPersistenceDebug
:app:generateDebugResValues
:app:generateDebugResources
:app:processDebugGoogleServices
Parsing json file: C:\Users\Josh\AndroidStudioProjects\NIFI\app\google-services.json
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
:app:processDebugResources
:app:generateDebugSources
:app:preDebugAndroidTestBuild
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mainApkListPersistenceDebugAndroidTest
:app:generateDebugAndroidTestResValues
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:mockableAndroidJar
BUILD SUCCESSFUL in 9m 44s
26 actionable tasks: 24 executed, 2 up-to-date
My gradle sync also takes over 15 minutes to complete.
All the while i have another project in android studio that runs normally and takes significantly less time to sync and build.
So the problem was a bunch of viruses and malware on my system. After running a boot time scan on my system i ran the build and now its back to taking a minute to run.

Error when multiple libraries use diferent versions of the same external library in gradle

I'm facing some problems when updating the external libraries that my app uses. Here are the gradle files:
Project build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.31'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
daggerVersion = "2.13"
supportVersion = "27.1.1"
}
Application build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.myapp"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation "com.android.support:cardview-v7:$supportVersion"
implementation "com.android.support:design:$supportVersion"
implementation "com.android.support:animated-vector-drawable:$supportVersion"
implementation "com.android.support:support-fragment:$supportVersion"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
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'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-auth:12.0.1'
implementation 'com.google.firebase:firebase-database:12.0.1'
implementation 'com.google.firebase:firebase-analytics:12.0.1'
// implementation 'com.android.support:multidex:1.0.3'
// Google Sign In SDK (only required for Google Sign In)
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.hannesdorfmann.mosby3:mvp-lce:3.0.4'
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
kapt 'com.github.bumptech.glide:compiler:4.6.1'
// Firebase UI
// Used in FirebaseUIActivity. The FirebaseUI-Android library has a minSdk level of 16
// so this library is only included in the minSdkJellybean variant.
implementation 'com.firebaseui:firebase-ui-auth:3.2.1'
// Facebook Android SDK (only required for Facebook Login)
// Used in FacebookLoginActivity. This is only compiled into the minSdkJellybean variant of this
// app. You can build a 'minSdkGingerbread' variant to test on devices with 9 <= SDK <= 15.
implementation 'com.facebook.android:facebook-login:4.31.0'
implementation "com.android.support:customtabs:$supportVersion"
// Twitter Android SDK (only required for Twitter Login)
// implementation('com.twitter.sdk.android:twitter-core:3.2.0#aar') {
// transitive = true
// }
// implementation('com.twitter.sdk.android:twitter:3.2.0#aar') {
// transitive = true
// }
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// Dagger
implementation "com.google.dagger:dagger:$rootProject.daggerVersion"
kapt "com.google.dagger:dagger-compiler:$rootProject.daggerVersion"
implementation "com.google.dagger:dagger-android:$rootProject.daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$rootProject.daggerVersion"
implementation "com.google.dagger:dagger-android-support:$rootProject.daggerVersion"
// Room
implementation "android.arch.persistence.room:runtime:1.0.0"
kapt "android.arch.persistence.room:compiler:1.0.0"
implementation "android.arch.lifecycle:common-java8:1.1.1"
// RxJava
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.6'
// compile 'io.reactivex.rxjava2:rxkotlin:2.2.0'
// RxFirebase
implementation('com.github.b3er.rxfirebase:firebase-database:11.2.0') {
transitive = false
}
// // PhotoView
// implementation 'com.github.chrisbanes:PhotoView:2.1.3'
// ucrop
// implementation 'com.github.yalantis:ucrop:2.2.2'
}
apply plugin: 'com.google.gms.google-services'
But when I try to run the application I get the following error:
Executing tasks: [:app:assembleDebug]
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
app: 'annotationProcessor' dependencies won't be recognized as kapt annotation processors. Please change the configuration name to 'kapt' for these artifacts: 'com.github.bumptech.glide:compiler:4.6.1'.
:app:buildInfoDebugLoader
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mainApkListPersistenceDebug UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:processDebugGoogleServices
Parsing json file: /Users/joan/Development/myapp/git/myapp-android/app/google-services.json
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources
:app:kaptGenerateStubsDebugKotlin
:app:kaptDebugKotlin
w: Note: [1] Wrote GeneratedAppGlideModule with: []
w: warning: Supported source version 'RELEASE_7' from annotation processor 'org.jetbrains.kotlin.kapt3.ProcessorWrapper' less than -source '1.8'
w: /Users/joan/Development/myapp/git/myapp-android/app/build/tmp/kapt3/stubs/debug/com/myapp/model/ApplicationDatabase.java:7: warning: Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument OR set exportSchema to false.
public abstract class ApplicationDatabase extends android.arch.persistence.room.RoomDatabase {
^
:app:compileDebugKotlin
:app:prepareLintJar UP-TO-DATE
:app:generateDebugSources
:app:javaPreCompileDebug
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileDebugJavaWithJavac
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:packageInstantRunResourcesDebug
:app:validateSigningDebug
:app:processInstantRunDebugResourcesApk
:app:checkManifestChangesDebug
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithExtractJarsForDebug
:app:transformClassesWithInstantRunVerifierForDebug
:app:transformClassesWithDependencyCheckerForDebug
:app:compileDebugNdk NO-SOURCE
:app:mergeDebugJniLibFolders
:app:transformNativeLibsWithMergeJniLibsForDebug
:app:processDebugJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug
:app:transformNativeLibsAndResourcesWithJavaResourcesVerifierForDebug
:app:transformClassesWithInstantRunForDebug
:app:transformClassesEnhancedWithInstantReloadDexForDebug
:app:incrementalDebugTasks
:app:preColdswapDebug
:app:fastDeployDebugExtractor
:app:generateDebugInstantRunAppInfo
:app:transformClassesWithInstantRunSlicerForDebug
:app:transformClassesWithDexBuilderForDebug
AGPBI: {"kind":"error","text":"Program type already present: android.arch.lifecycle.LiveData$1","sources":[{}],"tool":"D8"}
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
:app:buildInfoGeneratorDebug
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/0.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/1.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/2.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/3.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/4.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/5.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/6.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/7.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/8.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/9.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/10.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/11.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/12.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/13.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/14.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/15.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/16.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/17.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/18.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/19.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/20.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/21.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/22.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/23.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/24.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/25.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/26.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/27.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/28.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/29.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/30.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/31.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/32.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/33.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/34.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/35.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/36.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/37.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/38.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/39.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/40.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/41.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/42.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/43.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/44.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/45.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/46.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/47.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/48.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/49.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/50.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/51.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/52.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/53.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/54.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/55.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/56.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/57.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/58.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/59.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/60.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/61.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/62.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/63.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/64.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/65.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/66.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/67.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/68.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/69.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/70.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/71.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/72.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/73.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/74.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/75.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/76.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/77.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/78.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/79.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/80.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/81.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/82.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/83.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/84.jar, /Users/joan/Development/myapp/git/myapp-android/app/build/intermediates/transforms/dexBuilder/debug/85.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 22s
45 actionable tasks: 34 executed, 11 up-to-date
But if I change the supportVersion to 27.0.2 everything works fine until I add an other library (implementation 'com.github.yalantis:ucrop:2.2.2'), then I have the same issue. It looks like each library is using different versions of other libs I use, but I don't know how to solve this issue. Any help?

Error:Execution failed for task ':app:generateDebugBuildConfig'. java.io.FileNotFoundException:

Executing tasks: [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:app:prepareComAndroidSupportAppcompatV72531Library
:app:prepareComAndroidSupportCardviewV72340Library
:app:prepareComAndroidSupportDesign2531Library
:app:prepareComAndroidSupportRecyclerviewV72531Library
:app:prepareComAndroidSupportSupportCompat2531Library
:app:prepareComAndroidSupportSupportCoreUi2531Library
:app:prepareComAndroidSupportSupportCoreUtils2531Library
:app:prepareComAndroidSupportSupportFragment2531Library
:app:prepareComAndroidSupportSupportMediaCompat2531Library
:app:prepareComAndroidSupportSupportV42531Library
:app:prepareComAndroidSupportSupportVectorDrawable2531Library
:app:prepareComAndroidSupportTransition2531Library
:app:prepareComGithubPaolorotoloAppintro400Library
:app:prepareComGithubRey5137Material124Library
:app:prepareComGoogleAndroidGmsPlayServicesBase1101Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement1101Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks1101Library
:app:prepareComGoogleFirebaseFirebaseAnalytics1101Library
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1101Library
:app:prepareComGoogleFirebaseFirebaseAppindexing1101Library
:app:prepareComGoogleFirebaseFirebaseCommon1101Library
:app:prepareComGoogleFirebaseFirebaseCore1101Library
:app:prepareComGoogleFirebaseFirebaseCrash1101Library
:app:prepareComGoogleFirebaseFirebaseIid1101Library
:app:prepareComMcxiaokeVolleyLibraryAar100Library
:app:prepareComMikhaellopezCircularimageview302Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:generateDebugBuildConfig'.
> java.io.FileNotFoundException: C:\....\app\build\generated\source\buildConfig\debug\ \BuildConfig.java (The system cannot find the path specified)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.668 secs
Unable to understand what went wrong. Anybody have any pointers if I can see?
What I've tried so far is changed the version of support libs(currently using 25.3.1) and project configurations in app's build.gradle. Below is my build.gradle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.some.package"
minSdkVersion 14
targetSdkVersion 26
versionCode 5
versionName "5.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:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.firebase:firebase-analytics:11.0.1'
compile 'com.google.firebase:firebase-appindexing:11.0.1'
compile 'com.google.firebase:firebase-crash:11.0.1'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.github.rey5137:material:1.2.4'
compile 'com.github.paolorotolo:appintro:4.0.0'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
I've tried to build same version which I've downloaded from version control but still giving me same error. I've tried to build some different project and it is successfully build.
Anybody faced this previously if yes how did you solved this? Any pointer where should I look?
Thanks in advance.
- Rahul

Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbz;

I am getting these frustrating errors when attempting a gradle release build of a signed APK in Android Studio. One of the 7 errors is Error:Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbz;
Here is the gradle Console Output:
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2501Library
:app:prepareComAndroidSupportAppcompatV72501Library
:app:prepareComAndroidSupportCardviewV72500Library
:app:prepareComAndroidSupportCustomtabs2500Library
:app:prepareComAndroidSupportDesign2501Library
:app:prepareComAndroidSupportMultidex101Library
:app:prepareComAndroidSupportRecyclerviewV72501Library
:app:prepareComAndroidSupportSupportCompat2501Library
:app:prepareComAndroidSupportSupportCoreUi2501Library
:app:prepareComAndroidSupportSupportCoreUtils2501Library
:app:prepareComAndroidSupportSupportFragment2501Library
:app:prepareComAndroidSupportSupportMediaCompat2501Library
:app:prepareComAndroidSupportSupportV132501Library
:app:prepareComAndroidSupportSupportV42501Library
:app:prepareComAndroidSupportSupportVectorDrawable2501Library
:app:prepareComAndroidSupportTestTestingSupportLib01Library
:app:prepareComAndroidSupportTestUiautomatorUiautomatorV18212Library
:app:prepareComAndroidSupportTransition2501Library
:app:prepareComAndroidVolleyVolley100Library
:app:prepareComFacebookAndroidAccountKitSdk4180Library
:app:prepareComFacebookAndroidAudienceNetworkSdk4180Library
:app:prepareComFacebookAndroidFacebookAndroidSdk4180Library
:app:prepareComGithubCoyarzun89Fabtransitionactivity020Library
:app:prepareComGithubOzodrukhCircularReveal131Library
:app:prepareComGoogleAndroidExoplayerExoplayerR158Library
:app:prepareComGoogleAndroidGmsPlayServicesAds840Library
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics1001Library
:app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1001Library
:app:prepareComGoogleAndroidGmsPlayServicesAuth1001Library
:app:prepareComGoogleAndroidGmsPlayServicesAuthBase1001Library
:app:prepareComGoogleAndroidGmsPlayServicesBase1001Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement1001Library
:app:prepareComGoogleAndroidGmsPlayServicesLocation1001Library
:app:prepareComGoogleAndroidGmsPlayServicesMaps1001Library
:app:prepareComGoogleAndroidGmsPlayServicesPlus1001Library
:app:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1001Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks1001Library
:app:prepareComGoogleFirebaseFirebaseAnalytics1001Library
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1001Library
:app:prepareComGoogleFirebaseFirebaseAppindexing1001Library
:app:prepareComGoogleFirebaseFirebaseCommon1001Library
:app:prepareComGoogleFirebaseFirebaseCore1001Library
:app:prepareComGoogleFirebaseFirebaseIid1001Library
:app:prepareComGoogleMapsAndroidAndroidMapsUtils04Library
:app:prepareNetSteamcraftedLoadToast1010Library
:app:prepareNetYslibraryKeyboardvisibilityeventKeyboardvisibilityevent101Library
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:processReleaseGoogleServices
Parsing json file: C:\Users\antho\AndroidStudioProjects\suRRo\app\google-services.json
:app:generateReleaseResources
:app:mergeReleaseResources UP-TO-DATE
:app:processReleaseManifest UP-TO-DATE
:app:processReleaseResources UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:app:javaPreCompileRelease
:app:compileReleaseJavaWithJavac UP-TO-DATE
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources UP-TO-DATE
:app:mergeReleaseShaders UP-TO-DATE
:app:compileReleaseShaders UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets UP-TO-DATE
:app:transformClassesWithDexForRelease
Running dex as a separate process.
To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 4608 MB (based on the dexOptions.javaMaxHeapSize = 4g).
To do this set org.gradle.jvmargs=-Xmx4608M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
AGPBI: {"kind":"error","text":"Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbz;","sources":[{}]}
AGPBI: {"kind":"error","text":"Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzai;","sources":[{}]}
AGPBI: {"kind":"error","text":"Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzai$zza;","sources":[{}]}
AGPBI: {"kind":"error","text":"Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzai$zzb;","sources":[{}]}
AGPBI: {"kind":"error","text":"Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzai$zzc;","sources":[{}]}
AGPBI: {"kind":"error","text":"Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzai$zzd;","sources":[{}]}
AGPBI: {"kind":"error","text":"Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzai$zze;","sources":[{}]}
AGPBI: {"kind":"error","text":"Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzai$zzf;","sources":[{}]}
AGPBI: {"kind":"error","text":"Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzai$zzg;","sources":[{}]}
AGPBI: {"kind":"error","text":"Error converting bytecode to dex:\nCause: java.lang.RuntimeException: Translation has been interrupted","sources":[{}],"original":"UNEXPECTED TOP-LEVEL EXCEPTION:\njava.lang.RuntimeException: Translation has been interrupted\n\tat com.android.dx.command.dexer.Main.processAllFiles(Main.java:613)\n\tat com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)\n\tat com.android.dx.command.dexer.Main.run(Main.java:275)\n\tat com.android.dx.command.dexer.Main.main(Main.java:245)\n\tat com.android.dx.command.Main.main(Main.java:106)\nCaused by: java.lang.InterruptedException: Too many errors\n\tat com.android.dx.command.dexer.Main.processAllFiles(Main.java:605)\n\t... 4 more\n","tool":"Dex"}
:app:transformClassesWithDexForRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
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: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --force-jumbo --num-threads=4 --multi-dex --output C:\Users\antho\AndroidStudioProjects\suRRo\app\build\intermediates\transforms\dex\release\folders\1000\1f\main C:\Users\antho\.android\build-cache\2d0b91b1c1c87808b2e3340e90ac83a720b15f50\output\jars\classes.jar C:\Users\antho\.android\build-cache\a7a058614312b7a634e1cbc699ed60d0ef57f501\output\jars\classes.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.5\e7fd981408caba8a0c0fb276413562468d260160\log4j-api-2.5.jar C:\Users\antho\.android\build-cache\aaf405a541520b4e4077fdefe0fcb1c796c17608\output\jars\classes.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.4.0\d6a66c7a5f01cf500377bd669507a08cfeba882a\jackson-annotations-2.4.0.jar C:\Users\antho\.android\build-cache\ac1e5c369d56f1b4ec7890c48bac586070d34243\output\jars\classes.jar C:\Users\antho\.android\build-cache\c174b3d25e69025e44814ef345573464589ffd2d\output\jars\classes.jar C:\Users\antho\.android\build-cache\b763cf772457e939e914c0794d87762d4c7f0fcd\output\jars\classes.jar C:\Users\antho\.android\build-cache\7b0bb18190c5d4348456cc5833551352204457c7\output\jars\classes.jar C:\Users\antho\.android\build-cache\65dc799efbb181f4617e9dc488b1bc2d844bd446\output\jars\classes.jar C:\Users\antho\.android\build-cache\131c5523d1c6a055766b00aedc2581c6a3a8e49f\output\jars\classes.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.4.2\ceb72830d95c512b4b300a38f29febc85bdf6e4b\jackson-core-2.4.2.jar C:\Users\antho\AndroidStudioProjects\suRRo\app\libs\httpclient-4.5.1.jar C:\Users\antho\.android\build-cache\18c93fb35c04381f761571b82bc4a31ca5c1e905\output\jars\classes.jar C:\Users\antho\AppData\Local\Android\Sdk\extras\android\m2repository\com\android\support\support-annotations\25.0.1\support-annotations-25.0.1.jar C:\Users\antho\.android\build-cache\afe31b5f75506c2e56edcdf521edecfe36d32b72\output\jars\classes.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\org.hamcrest\hamcrest-core\1.1\860340562250678d1a344907ac75754e259cdb14\hamcrest-core-1.1.jar C:\Users\antho\.android\build-cache\27a595fcfbc73f29f29b1fb461cc5f86f5318c8c\output\jars\classes.jar C:\Users\antho\.android\build-cache\99ce96694731ff47b104f2e290f67fe10ce90c54\output\jars\classes.jar C:\Users\antho\.android\build-cache\fdd1d0c87a40cf863e704483c0ef58a4ff029324\output\jars\libs\internal_impl-25.0.1.jar C:\Users\antho\.android\build-cache\74fd0bcdbd9ce8252c8b8ff0fef5999144799f9e\output\jars\classes.jar C:\Users\antho\.android\build-cache\42c36cf9c2f6d278402c8540ff48575a20db3fb3\output\jars\classes.jar C:\Users\antho\.android\build-cache\67fa7bfce85d308be6fc4b9ba769bfd8c677694f\output\jars\libs\internal_impl-25.0.1.jar C:\Users\antho\.android\build-cache\d5dcb7f8701d53bdda06c0468a25b4b0f3218ba9\output\jars\classes.jar C:\Users\antho\.android\build-cache\2258f8b1fc724b8596ba44ccce89a6344d994c23\output\jars\libs\internal_impl-25.0.1.jar C:\Users\antho\.android\build-cache\fe966e9f5777e76d91fdf25e6ddb8fa5abca49f0\output\jars\classes.jar C:\Users\antho\.android\build-cache\3fd480b6609ab4b64ad5e40e4c3c580c0cfe5b28\output\jars\classes.jar C:\Users\antho\.android\build-cache\aa969ef2a2206302c350fc9da25b4973fcb78e34\output\jars\classes.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\com.parse.bolts\bolts-tasks\1.4.0\d85884acf6810a3bbbecb587f239005cbc846dc4\bolts-tasks-1.4.0.jar C:\Users\antho\.android\build-cache\fe966e9f5777e76d91fdf25e6ddb8fa5abca49f0\output\jars\libs\internal_impl-25.0.1.jar C:\Users\antho\.android\build-cache\8cac689fa47637e234d097fb344a648a8a4e8eac\output\jars\classes.jar C:\Users\antho\.android\build-cache\95134680f666232e9b56425037167f9940c5579c\output\jars\classes.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.4\695b63d702f505b9b916e02272e3b6381bade7f\gson-2.4.jar C:\Users\antho\.android\build-cache\c9d985492464b4d6f493c3299fe3cfcd53c9814c\output\jars\classes.jar C:\Users\antho\.android\build-cache\2d0b91b1c1c87808b2e3340e90ac83a720b15f50\output\jars\libs\internal_impl-25.0.1.jar C:\Users\antho\.android\build-cache\fdd1d0c87a40cf863e704483c0ef58a4ff029324\output\jars\classes.jar C:\Users\antho\.android\build-cache\67fa7bfce85d308be6fc4b9ba769bfd8c677694f\output\jars\classes.jar C:\Users\antho\.android\build-cache\8b395f0464ca19c82b8b12a95c601918c8ededc6\output\jars\classes.jar C:\Users\antho\.android\build-cache\f6c8c1a1e59d4c435d1849d2bd756adbc0e948ce\output\jars\classes.jar C:\Users\antho\.android\build-cache\af273acbd78dfb7869cd92938b5f0f64aed37737\output\jars\classes.jar C:\Users\antho\AndroidStudioProjects\suRRo\app\libs\common-lang3.jar C:\Users\antho\.android\build-cache\a279b16f426a47a725cb11ebbb9f91e21324970a\output\jars\classes.jar C:\Users\antho\.android\build-cache\4044de0f4e99590b27abe31e592799a6f6b22909\output\jars\classes.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\com.parse.bolts\bolts-applinks\1.4.0\8ad21bf21784dacce5f2043afb97218cc377e835\bolts-applinks-1.4.0.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\junit\junit-dep\4.10\64417b3bafdecd366afa514bd5beeae6c1f85ece\junit-dep-4.10.jar C:\Users\antho\.android\build-cache\a6a746c76b80fb188a449e9dc90808d61464d15a\output\jars\classes.jar C:\Users\antho\.android\build-cache\dcedf40f0b285b2c5a5bf8d72b971dd3281f2058\output\jars\classes.jar C:\Users\antho\.android\build-cache\41f0bed0c279cdfbeddddfd188f9da5fa63d32aa\output\jars\classes.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.4.2\8e31266a272ad25ac4c089734d93e8d811652c1f\jackson-databind-2.4.2.jar C:\Users\antho\.android\build-cache\9e62638a47b2a6ad55f57536070e28935f57d98e\output\jars\classes.jar C:\Users\antho\.android\build-cache\b087012239c40414676ceea614da7db4cee81385\output\jars\classes.jar C:\Users\antho\.android\build-cache\0e8bce1e98224e469a4886ca72d8386891ef45cd\output\jars\classes.jar C:\Users\antho\AndroidStudioProjects\suRRo\app\build\intermediates\classes\release C:\Users\antho\.android\build-cache\4c0fe81be18463201973d15abb1c132c9abf7150\output\jars\classes.jar C:\Users\antho\AndroidStudioProjects\suRRo\app\libs\httpcore-4.4.3.jar C:\Users\antho\.android\build-cache\2f9d494d73626bc874dd2faf38cfd1b1219a3755\output\jars\classes.jar C:\Users\antho\.android\build-cache\47b157cd79531994adab5447efea8041ed038aee\output\jars\classes.jar C:\Users\antho\.android\build-cache\8a6b9a62ff5b629bae4798656cea706b3f90a0bf\output\jars\classes.jar C:\Users\antho\.android\build-cache\c9d985492464b4d6f493c3299fe3cfcd53c9814c\output\jars\libs\internal_impl-25.0.1.jar C:\Users\antho\.android\build-cache\9bff2a736b283147fd0c814e123bcf0f224ab162\output\jars\classes.jar C:\Users\antho\AndroidStudioProjects\suRRo\app\libs\rabbitmq-client.jar C:\Users\antho\.android\build-cache\2258f8b1fc724b8596ba44ccce89a6344d994c23\output\jars\classes.jar C:\Users\antho\.android\build-cache\ee47fdf395ed82d328d79020b5ca98da7f61abd5\output\jars\classes.jar C:\Users\antho\.gradle\caches\modules-2\files-2.1\com.nineoldandroids\library\2.4.0\e9b63380f3a242dbdbf103a2355ad7e43bad17cb\library-2.4.0.jar C:\Users\antho\.android\build-cache\f2b28e73da25dbc4a49a01a3e145300917435d27\output\jars\classes.jar C:\Users\antho\.android\build-cache\e1ddaa2ecd6104c4ac36217a4681b182fe69ab20\output\jars\classes.jar C:\Users\antho\.android\build-cache\890602f5504b8a1586620d80ada235b0686b86a8\output\jars\classes.jar}
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 17.147 secs
Here is my Gradle File for the App:
apply plugin: 'com.android.application'
configurations {
all*.exclude group: 'com.google.android.gms', module: 'play-services'
}
android {
dexOptions {
javaMaxHeapSize "4g"
jumboMode = true
preDexLibraries = false
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
signingConfigs {
debug {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('C:/Users/antho/.android/debug.keystore')
storePassword 'android'
}
release {
keyAlias ''
keyPassword ''
storeFile file('')
storePassword ''
}
}
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.mobilereign.suRRoLive"
minSdkVersion 23
targetSdkVersion 25
versionCode 1
versionName "1.0.1"
multiDexEnabled = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
renderscriptDebuggable false
}
debug {
minifyEnabled false
debuggable true
jniDebuggable true
signingConfig signingConfigs.debug
renderscriptDebuggable true
zipAlignEnabled false
}
}
packagingOptions {
exclude 'libs/gson-1.7.1.jar'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/MANIFEST.MF'
}
productFlavors {
}
}
repositories {
flatDir {
dirs 'libs'
}
repositories {
mavenCentral()
}
maven {
url "https://jitpack.io"
}
}
dependencies {
compile 'com.android.support:support-v4:25.0.1'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:support-v13:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.google.code.gson:gson:2.4'
compile 'com.google.android.gms:play-services-analytics:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.google.firebase:firebase-appindexing:10.0.1'
compile 'com.google.android.gms:play-services-plus:10.0.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services-location:10.0.1'
compile 'com.google.maps.android:android-maps-utils:0.4'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:multidex:1.0.1'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/common-lang3.jar')
compile files('libs/httpcore-4.4.3.jar')
compile files('libs/httpclient-4.5.1.jar')
compile 'org.apache.logging.log4j:log4j-api:2.5'
compile files('libs/rabbitmq-client.jar')
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.facebook.android:audience-network-sdk:4.+'
compile 'com.facebook.android:account-kit-sdk:4.+'
compile 'com.fasterxml.jackson.core:jackson-core:2.4.2'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.4.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.2'
compile 'net.steamcrafted:load-toast:1.0.10'
compile 'com.github.coyarzun89:fabtransitionactivity:0.2.0'
compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:1.0.1'
compile 'com.android.support.test:testing-support-lib:0.1'
compile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
}
apply plugin: 'com.google.gms.google-services'
Here is my Gradle File for the Project:
// 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:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Basically I am wondering if anyone can tell me what I need to exclude from a particular dependency or dependencies to make this work. I have wasted 2 days on this. I am very frustrated and any help would be greatly appreciated.
For the error "already added:..." : it seems You have same dependence/jar included twice.
Check with command line :
gradlew -q dependencies app:dependencies --configuration compile
Then exclude module included twice.
I guess your gradle heap size is too small
First of all:
dexOptions {
javaMaxHeapSize "4g"
jumboMode = true
preDexLibraries = false
}
is deprecated
Secondly:
and add
org.gradle.configureondemand=true
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx4608M
in your root project gradle.properties
thirdly:
sync gradle

Android studio minify enabled = true , not able to generate apk?

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'realm-android'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultPublishConfig "debug"
defaultConfig {
applicationId "com.youth4work.ibps"
minSdkVersion 16
targetSdkVersion 23
multiDexEnabled true
versionCode 1
versionName "1.0.0"
}
signingConfigs {
release {
storeFile file('keystore/youth4work_second_key')
keyAlias 'youth4work_second_key_alias'
keyPassword "youth4work"
storePassword "youth4work"
}
debug {
storeFile file('keystore/debug.keystore')
keyAlias 'androiddebugkey'
storePassword 'android'
keyPassword 'android'
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
versionNameSuffix "Debug"
debuggable true
}
}
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
retrolambda {
jvmArgs '-noverify'
}
dependencies {
final PLAY_SERVICES_VERSION = '8.3.0'
final SUPPORT_LIBRARY_VERSION = '23.3.0'
// Google Play Services
compile "com.google.android.gms:play-services-base:$PLAY_SERVICES_VERSION"
compile "com.google.android.gms:play-services- analytics:$PLAY_SERVICES_VERSION"
compile "com.google.android.gms:play-services-gcm:$PLAY_SERVICES_VERSION"
compile "com.google.android.gms:play-services-plus:$PLAY_SERVICES_VERSION"
// Support Libraries
compile "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:cardview-v7:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
compile 'com.android.support:support-annotations:23.3.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.jakewharton.timber:timber:4.1.0'
compile 'com.jakewharton.rxbinding:rxbinding:0.4.0'
compile 'com.github.siyamed:android-shape-imageview:0.9.+#aar'
compile 'com.github.kevinsawicki:timeago:1.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.8.2'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.mobsandgeeks:android-saripaar:2.0.2'
compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.1.1'
compile 'com.github.jakob-grabner:Circle-Progress-View:1.2.8'
compile 'com.github.vlonjatg:progress-activity:v1.0.3'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'
compile 'com.daasuu:animateHorizontalProgressBar:0.2.2'
compile 'io.reactivex:rxjava:1.1.0'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'com.trello:rxlifecycle:0.4.0'
compile 'com.trello:rxlifecycle-components:0.4.0'
compile('com.github.afollestad.material-dialogs:core:0.8.5.6#aar') {
transitive = true
}
compile('com.mikepenz:fastadapter:1.4.0#aar') {
transitive = true
}
testCompile 'junit:junit:4.12'
}
// Log out test results to console
tasks.matching { it instanceof Test }.all {
testLogging.events = ["failed", "passed", "skipped"]
}
here if i make minify enabled = false the code runs fine while if i use true the code shows
Information:Gradle tasks [:app:assembleRelease] google-services plugin
could not detect any version for com.google.android.gms, default
version: 8.3.0 will be used. please apply google-services plugin at
the bottom of the build file. :app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE :app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2330Library
UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72330Library
UP-TO-DATE :app:prepareComAndroidSupportCardviewV72330Library
UP-TO-DATE :app:prepareComAndroidSupportDesign2330Library UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42330Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2330Library
UP-TO-DATE :app:prepareComDaasuuAnimateHorizontalProgressBar022Library
UP-TO-DATE :app:prepareComFacebookAndroidFacebookAndroidSdk482Library
UP-TO-DATE
:app:prepareComGithubAfollestadMaterialDialogsCore0856Library
UP-TO-DATE
:app:prepareComGithubJakobGrabnerCircleProgressView128Library
UP-TO-DATE :app:prepareComGithubSiyamedAndroidShapeImageview093Library
UP-TO-DATE :app:prepareComGithubVlonjatgProgressActivityV103Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library
UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBase830Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement830Library
UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesGcm830Library
UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library
UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesPlus830Library
UP-TO-DATE :app:prepareComJakewhartonRxbindingRxbinding040Library
UP-TO-DATE :app:prepareComJakewhartonTimberTimber410Library UP-TO-DATE
:app:prepareComJoanzapataIconifyAndroidIconify211Library UP-TO-DATE
:app:prepareComJoanzapataIconifyAndroidIconifyFontawesome211Library
UP-TO-DATE :app:prepareComMikepenzFastadapter140Library UP-TO-DATE
:app:prepareComRengwuxianMaterialedittextLibrary214Library UP-TO-DATE
:app:prepareComTrelloRxlifecycle040Library UP-TO-DATE
:app:prepareComTrelloRxlifecycleComponents040Library UP-TO-DATE
:app:prepareIoReactivexRxandroid110Library UP-TO-DATE
:app:prepareIoRealmRealmAndroidLibrary0883Library UP-TO-DATE
:app:prepareMeZhanghaiAndroidMaterialprogressbarLibrary114Library
UP-TO-DATE :app:prepareReleaseDependencies :app:compileReleaseAidl
:app:compileReleaseRenderscript :app:generateReleaseBuildConfig
:app:generateReleaseAssets UP-TO-DATE :app:mergeReleaseAssets
:app:generateReleaseResValues UP-TO-DATE
:app:processReleaseGoogleServices :app:generateReleaseResources
:app:mergeReleaseResources :app:processReleaseManifest
:app:processReleaseResources :app:generateReleaseSources
:app:compileReleaseJavaWithJavac Note: Some input files use or
override a deprecated API. Note: Recompile with -Xlint:deprecation for
details. Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:compileRetrolambdaRelease :app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources :app:prePackageMarkerForRelease
:app:transformClassesWithRealmTransformerForRelease
:app:processReleaseJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForRelease
:app:transformClassesAndResourcesWithProguardForRelease assmember)
Warning:there were 1 unresolved references to library class members.
You probably need to update the library versions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
Warning:Exception while processing task java.io.IOException: Please
correct the above warnings first.
:app:transformClassesAndResourcesWithProguardForRelease FAILED
Error:Execution failed for task
':app:transformClassesAndResourcesWithProguardForRelease'.
java.io.IOException: Please correct the above warnings first. Information:BUILD FAILED Information:Total time: 27.946 secs
Information:1 error Information:91 warnings Information:See complete
output in console
If you enable minifying, the build will call Proguard to strip out every unnecessary classes, members and methods.
For this to work, you'll need a proguard config file, which will tell Proguard which classes are your entrypoint to your classes and which members and methods should be kept.
The error you are seeing is a common error for mismatching method calls.
The error includes a link to the Proguard manual, describing the error a bit more: you'll have to make sure that you are using the right Android Build Target and that you keep all necessary libs and their methods.
Try to adapt the Android Build Target in your properties. If this doesn't work, you'll have to check if you need more entries in your proguard config.

Categories

Resources