After reformatting my laptop and installed the latest version of android studio
the FCM token generation suddenly stopped.
I updated firebase messaging to 18.0.0
App-level Build.gradle file
android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationId "com.myapp.app"
minSdkVersion 21
targetSdkVersion 26
versionCode 21
versionName "1.0.21"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
}
dexOptions {
javaMaxHeapSize "Xg"
// jumboMode = true
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//noinspection GradleCompatible
implementation 'com.android.support:design:26.1.0'
//noinspection OutdatedLibrary
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.google.code.gson:gson:2.3'
implementation 'com.android.support:multidex:1.0.1'
implementation 'de.hdodenhof:circleimageview:1.2.1'
implementation 'com.github.gcacace:signature-pad:1.2.1'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.soundcloud.android:android-crop:1.0.1#aar'
implementation 'com.github.bumptech.glide:glide:3.5.2'
implementation 'com.google.android.gms:play-services-location:11.4.2'
implementation 'com.google.android.gms:play-services-maps:11.4.2'
implementation 'com.google.android.gms:play-services:11.4.2'
implementation 'com.google.android.gms:play-services-gcm:11.4.2'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
//implementation 'com.google.firebase:firebase-core:11.4.2'
//implementation 'com.google.firebase:firebase-messaging:11.4.2'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'com.intuit.sdp:sdp-android:1.0.5'
implementation 'com.shuhart.stepview:stepview:1.2.6'
implementation 'com.xw.repo:bubbleseekbar:3.6'
implementation 'com.github.andyxialm:ColorDialog:1.0.0'
implementation 'com.github.twinkle942910:monthyearpicker:0.0.1'
implementation 'com.daasuu:EasingInterpolator:1.0.0'
implementation 'com.agrawalsuneet.androidlibs:dotsloader:1.1'
implementation 'io.nlopez.smartlocation:library:3.3.3'
implementation 'com.bogdwellers:pinchtozoom:0.1'
implementation 'org.jsoup:jsoup:1.8.3'
implementation 'com.wdullaer:materialdatetimepicker:2.3.0'
implementation 'com.airbnb.android:lottie:2.5.0-rc1'
implementation 'com.razorpay:checkout:1.5.5'
implementation 'com.google.zxing:core:3.2.1'
}
apply plugin: 'com.google.gms.google-services'
Project Level Build.gradle file
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.1.0'
classpath 'io.fabric.tools:gradle:1.25.4'
}
}
all projects {
repositories {
jcenter()
maven {
url "https://maven.google.com" // Google's Maven repository
}
maven { url "https://jitpack.io" }
//mavenCentral()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Getting Error
error: cannot access zzbck
class file for com.google.android.gms.internal.zzbck not found
tried to change this with
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services:16.0.0'
implementation 'com.google.android.gms:play-services-gcm:16.0.0'
Related
this is my gradle.build code im getting issues like library not found and update versions like that after i have changed to the latest version also im getting that its not supported im a beginner and im creating an chatting app for my final year project.
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "afterapps.com.firebaseim"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter()
maven{
url "https://maven.google.com"
}
}
repositories {
jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'frankiesardo:icepick:3.2.0'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.jakewharton:butterknife:8.4.0'
implementation 'com.zsoltsafrany:needle:1.0.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
provided 'frankiesardo:icepick-processor:3.2.0'
implementation 'joda-time:joda-time:2.9.7'
}
apply plugin: 'com.google.gms.google-services'
https://github.com/MahmoudAlyuDeen/FirebaseIM
Those dependencies are in general quite outdated ...and the Gradle wrapper should be 5.4.1.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://clojars.org/repo/" }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
mavenCentral()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
com.android.support only works with versions of Firebase libraries, which do not use androidx:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.afterapps.firebaseim"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
// https://firebase.google.com/support/release-notes/android#2019-06-17
//noinspection GradleDependency
implementation 'com.google.firebase:firebase-messaging:19.2.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'frankiesardo:icepick:3.2.0'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.zsoltsafrany:needle:1.0.0'
implementation 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compileOnly 'frankiesardo:icepick-processor:3.2.0'
implementation 'joda-time:joda-time:2.9.7'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
I have tried almost every solution there is on StackOverflow I recently updated my SDK from 27 to 28 and now on deploying my app, it gives me this error if I rollback the update it gives me resource linking error in merged.dir values XML before this my app was working correctly
My App Gradle build is
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.tech.usman.securityapp"
minSdkVersion 15
targetSdkVersion 28
versionCode 3
versionName "2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
/*release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}*/
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
pickFirst 'META-INF/LICENSE.txt' // picks the JavaMail license file
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'com.google.android.material:material:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0-beta01'
implementation 'androidx.vectordrawable:vectordrawable:1.0.0-beta01'
implementation 'com.google.firebase:firebase-messaging:17.4.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.android.support:appcompat-v7:27.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.android.support:design:27.0.1'
implementation 'com.github.ceryle:RadioRealButton:v2.1.1'
implementation 'com.android.support:support-v4:27.0.1'
implementation 'com.android.support:support-vector-drawable:27.0.1'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
// retrofit, gson
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
//implementation 'com.github.faruktoptas:FancyShowCaseView:1.0.0'
//circular progress
implementation 'com.github.rahatarmanahmed:circularprogressview:2.5.0'
//tray
implementation 'net.grandcentrix.tray:tray:0.12.0'
implementation('io.socket:socket.io-client:1.0.0') {
exclude group: 'org.json', module: 'json'
}
//http
//http looging
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
//dextor
implementation 'com.karumi:dexter:5.0.0'
//event bus
implementation 'org.greenrobot:eventbus:3.1.1'
//rx java
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.0'
implementation 'ru.rambler.android:swipe-layout:1.0.15'
implementation 'com.android.support:recyclerview-v7:27.0.1'
}
And my project gradle build previously my gradle tool version was com.android.tools.build:gradle:3.1.4
buildscript {
repositories {
google()
jcenter()
/*maven {
url 'https://maven.fabric.io/public'
}*/
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.google.gms:google-services:4.0.1'
//classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
maven {
url "https://maven.java.net/content/groups/public/"
}
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Am getting this warning during my build .
Warning: Exception while processing task java.io.IOException: Can't
write
[/Users/petrose/as_projects/MrPhone/app/build/intermediates/transforms/proguard/debug/0.jar]
(Can't read
[/Users/petrose/.gradle/caches/transforms-1/files-1.1/firebase-analytics-impl-16.2.4.aar/288ad7982e8f6024c8b5f0954f183721/jars/classes.jar(;;;;;;;**.class)]
(Duplicate jar entry
[com/google/android/gms/internal/measurement/eo.class]))
apply plugin: 'com.android.application'
//apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'org.greenrobot.greendao'
//apply plugin: 'io.fabric'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "....."
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables { useSupportLibrary = true }
multiDexEnabled true
resConfigs "en"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled true
useProguard true // obfuscate
shrinkResources true
}
debug {
minifyEnabled true
useProguard true // obfuscate
shrinkResources false
}
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
}
greendao {
schemaVersion 1
}
dependencies {
//extLib
implementation files('libs/YouTubeAndroidPlayerApi.jar')
//support Lib
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:recyclerview-v7:28.0.0"
implementation "com.android.support:cardview-v7:28.0.0"
implementation "com.android.support:design:28.0.0"
implementation "com.android.support:support-vector-drawable:28.0.0"
implementation "com.android.support.constraint:constraint-layout:$rootProject.constraintLibraryVersion"
implementation "com.android.support:customtabs:28.0.0"
//Google API Client Library
implementation('com.google.apis:google-api-services-youtube:v3-rev195-1.23.0') {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
exclude group: 'com.google.guava'
}
implementation('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
exclude group: 'com.google.guava'
}
// implementation('com.google.apis:google-api-services-calendar:v3-rev309-1.23.0') {
// exclude group: 'org.apache.httpcomponents'
// exclude group: 'com.google.guava'
//
// }
// image
//implementation "com.github.bumptech.glide:glide:$rootProject.glideVersion"
// implementation 'com.android.support:support-v4:27.1.1'
// implementation 'com.android.support.constraint:constraint-layout:1.1.0'
//annotationProcessor "com.github.bumptech.glide:compiler:$rootProject.glideVersion"
implementation "com.squareup.picasso:picasso:$rootProject.picassoVersion"
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
implementation 'com.commit451:PhotoView:1.2.4'
//Network
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation "com.squareup.retrofit2:retrofit:$rootProject.retorfitVersion"
implementation 'com.squareup.retrofit2:converter-scalars:2.2.0'
implementation "com.squareup.retrofit2:converter-gson:$rootProject.retorfitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$rootProject.retorfitVersion"
implementation 'org.jsoup:jsoup:1.10.3'
// parser
implementation "com.google.code.gson:gson:$rootProject.gsonVersion"
implementation 'com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:1.6.0'
//parceler
implementation 'org.parceler:parceler-api:1.1.12'
annotationProcessor 'org.parceler:parceler:1.1.12'
// database
implementation "org.greenrobot:greendao:$rootProject.greenDaoVersion"
debugImplementation "com.amitshekhar.android:debug-db:$rootProject.debugDBVersion"
//eventBus
implementation "org.greenrobot:eventbus:$rootProject.greenrobotVersion"
//DI
implementation "com.google.dagger:dagger-android:$rootProject.dagger2Version"
annotationProcessor "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"
implementation 'javax.inject:javax.inject:1'
compileOnly 'javax.annotation:jsr250-api:1.0'
// reactive
implementation "io.reactivex.rxjava2:rxjava:$rootProject.rxjava2Version"
implementation "com.github.miguelbcr:RxPaparazzo:$rootProject.rxRxPaparazzo"
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.1.1'
implementation "com.github.akarnokd:rxjava2-extensions:0.18.7"
//butterknife
implementation "com.jakewharton:butterknife:$rootProject.butterKnifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterKnifeVersion"
// logger
implementation "com.jakewharton.timber:timber:$rootProject.timberVersion"
implementation "com.github.nisrulz:easydeviceinfo-base:$rootProject.easyDeviceInfoVersion"
implementation 'com.github.tslamic:dn3:3.0'
//Firebase crash analytics
//implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
// facebook sdk
// implementation "com.facebook.android:facebook-android-sdk:$rootProject.facebookAndroidSDK"
// implementation "com.facebook.android:audience-network-sdk:$rootProject.facebookNetworkSDK"
implementation 'com.facebook.android:facebook-login:4.28.0'
implementation 'com.facebook.android:audience-network-sdk:5.1.0-beta'
// google sdk
// implementation "com.google.android.gms:play-services-analytics:$rootProject.googleLibraryVersion"
implementation('com.google.android.gms:play-services-analytics:16.0.4') {
exclude group: 'com.google.guava'
}
implementation('com.google.android.gms:play-services-ads:17.0.0') {
exclude group: 'com.google.guava'
}
implementation('com.google.android.gms:play-services-auth:16.0.0') {
exclude group: 'com.google.guava'
}
implementation('com.google.android.gms:play-services-gcm:16.0.0') {
exclude group: 'com.google.guava'
}
// fireBase libraries
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-config:16.1.3'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-inappmessaging-display:17.0.4'
implementation 'com.google.firebase:firebase-appindexing:17.1.0'
implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
//implementation 'com.google.firebase:firebase-perf:16.2.3'
//implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
//leak
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
//releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
//testLib
//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'
}
apply plugin: 'com.google.gms.google-services'
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1'
}
}
}
}
//Top-level build file
buildscript {
repositories {
google()
jcenter()
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
classpath 'io.fabric.tools:gradle:1.27.0'
classpath 'com.google.firebase:firebase-plugins:1.1.5'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
While preparing for output jar (0.jar) at path {module}/build/intermediates/transforms/proguard/debug/0.jar, gradle copies all dependent library classes.jars and there dependent classes.jar to form a single intermediate jar. So when 2 different libraries are dependent on a single module, that single module is copied twice while leads to this error.
This can be solved by marking compileOnly to that single module in libraries which are using that module.
I cleaned the project and rebuild the project, but I am still getting the error that Error: Program type already present: android.support.compat.R
this is my build.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
lintOptions {
abortOnError false
checkReleaseBuilds false
}
defaultConfig {
applicationId "example.com"
minSdkVersion 21
versionCode 93
versionName "4.1.7"
// 92 416
multiDexEnabled true
}
buildTypes {
release {
// shrinkResources true
// minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
// these are the lines that you have to add
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
}
dataBinding {
enabled true
}
}
repositories {
maven {
url "https://repo.eclipse.org/content/repositories/paho-snapshots/"
}
maven { url 'https://maven.fabric.io/public' }
maven {
url
'https://github.com/suckgamony/RapidDecoder/raw/master/repository'
}
}
dependencies {
// implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-
core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.nostra13.universalimageloader:universal-image-
loader:1.9.5'
implementation 'com.amazonaws:aws-android-sdk-apigateway-core:2.3.1'
implementation 'com.amazonaws:aws-android-sdk-core:2.3.1'
implementation 'com.amazonaws:aws-android-sdk-s3:2.3.1'
// implementation 'com.google.code.gson:gson:2.7'
// compile files('libs/com.cielowigle-2.4.8.jar')
/* implementation 'com.google.android.gms:play-services-maps:10.2.6'
implementation 'com.google.android.gms:play-services-
location:10.2.6'
implementation 'com.google.android.gms:play-services-plus:10.2.6'
implementation 'com.google.android.gms:play-services-gcm:10.2.6'*/
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-plus:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
/* compile 'net.zetetic:android-database-sqlcipher:3.5.4#aar'*/
implementation('org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.1')
{
exclude group: 'com.android.support', module:'appcompat'
}
implementation('org.eclipse.paho:org.eclipse.paho.android.service:1.1.2-
SNAPSHOT') {
exclude group: 'com.android.support', module:'appcompat'
}
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.github.wangjiegulu:AndroidBucket:1.0.4'
implementation 'com.github.wangjiegulu:ShadowViewHelper:1.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
// implementation files('libs/bcpkix-jdk15on-1.52.jar')
// implementation files('libs/bcprov-jdk15on-1.54.jar')
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.1'
implementation 'com.wdullaer:materialdatetimepicker:2.5.0'
implementation 'com.facebook.android:facebook-android-sdk:4.27.0'
implementation 'com.nostra13.universalimageloader:universal-image-
loader:1.9.5'
apply plugin: 'com.google.gms.google-services'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation files('libs/Jsonvalidation.jar')
implementation('com.crashlytics.sdk.android:crashlytics:2.6.5#aar') {
transitive = true;
}
implementation 'com.timehop.stickyheadersrecyclerview:library:0.4.1'
implementation 'rapid.decoder:library:0.3.0'
//implementation 'rapid.decoder:jpeg-decoder:0.3.0'
//implementation 'rapid.decoder:png-decoder:0.3.0'
//Retrofit New Libs
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
// Dragger
/* implementation "com.google.dagger:dagger:2.11"
annotationProcessor "com.google.dagger:dagger-compiler:2.11"
// provided 'javax.hj:jsr250-api:1.0'
implementation 'javax.inject:javax.inject:1'*/
implementation 'com.google.dagger:dagger:2.11'
implementation 'com.google.dagger:dagger-android-support:2.11'
annotationProcessor 'com.google.dagger:dagger-compiler:2.11'
annotationProcessor 'com.google.dagger:dagger-android-processor:2.11'
// debug db
debugImplementation 'com.amitshekhar.android:debug-db:1.0.0'
implementation('com.crashlytics.sdk.android:answers:1.4.1#aar') {
transitive = true;
}
}
I tried also invalidate cache option but I am getting the same error. I updated gradle and Google play service latest version. This is working in debug option but not in release mode.
I just tried everything I found on stackoverflow and I can't solve my problem, I enabled multidexing and disabled miniyfenabled and nothing happened, here is my app build.gradle, I can't find the problem and is getting annoying since 3 hours now.
android {
signingConfigs {
}
compileSdkVersion 26
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.xxxx.xxxx"
minSdkVersion 19
targetSdkVersion 26
versionCode 38
versionName "4.3.0" //
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Enabling multidex support.
multiDexEnabled true
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
buildTypes {
debug {
applicationIdSuffix '.debug'
}
//sourceSets.debug.resources.srcDirs = ['src/debug/res']
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
// packagingOptions {
// exclude 'META-INF/LICENSE.txt'
// exclude 'META-INF/NOTICE.txt'
// }
}
repositories {
mavenCentral()
maven() { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'lib')
compile('com.github.worker8:tourguide:1.0.17-SNAPSHOT#aar') {
transitive = true
}
// Required -- JUnit 4 framework
compile files('libs/SimpleNLG-4.4.8.jar')
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/mail.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.6.5#aar') {
transitive = true;
}
compile('com.github.worker8:tourguide:1.0.17-SNAPSHOT#aar') {
transitive = true
}
// Optional -- Mockito framework
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.android.support:customtabs:26.1.0'
implementation 'junit:junit:4.12'
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'io.github.kobakei:ratethisapp:1.2.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.mercadopago:sdk:3.7.2'
implementation 'com.google.guava:guava:23.3-android'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation group: 'com.google.apis', name: 'google-api-services-translate', version: 'v2-rev48-1.22.0'
implementation group: 'com.google.api-client', name: 'google-api-client-gson', version: '1.22.0'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
// Testing-only dependencies
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
compile('com.google.code.findbugs:jsr305:2.0.1')
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.0'
}
}
}
}
apply plugin: 'com.google.gms.google-services'
also tried disabling this implementation 'com.google.android.gms:play-services:11.8.0' and nothing too.
try with this inside dependencies
compile ('com.google.dagger:dagger:2.4') {
exclude group: 'com.google.guava'
}