I have migrated Fabric Crashlytic to Firebase Crashlytics. Now App is crashing in runtime
Process: com.treinetic.whiteshark, PID: 29371
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.IllegalStateException: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.
at android.app.ActivityThread.installProvider(ActivityThread.java:6537)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6025)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5931)
at android.app.ActivityThread.access$1200(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
My Gradle look like this
Project level build.gradle
buildscript {
ext.kotlin_version = '1.3.11'
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
// 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
}
App level build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.myapp.app"
minSdkVersion 21
targetSdkVersion 29
versionCode 15
versionName "1.1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
ext.enableCrashlytics = false
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
dataBinding {
enabled = true
}
dexOptions {
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'META-INF/core_release.kotlin_module'
exclude 'META-INF/MyApplication_debug.kotlin_module'
exclude 'META-INF/appname_debug.kotlin_module'
exclude 'META-INF/appname_debug.kotlin_module'
exclude 'META-INF/appname_release.kotlin_module'
exclude 'META-INF/appname_debug.kotlin_module'
}
testOptions {
unitTests.returnDefaultValues = true
// unitTests {
// includeAndroidResources = true
// }
sourceSets {
test {
resources.srcDirs += ['src/test/resources']
}
androidTest {
resources.srcDirs += ['src/androidTest/resources']
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'com.android.support:multidex:1.0.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha01'
//FIREBASE
implementation 'com.google.firebase:firebase-auth:19.3.1'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.firebase:firebase-messaging:20.2.1'
// implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
implementation 'com.google.firebase:firebase-analytics:17.4.2'
//GLIDE
implementation 'com.github.bumptech.glide:glide:4.9.0'
kapt 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
def multidex_version = "2.0.1"
implementation "androidx.multidex:multidex:$multidex_version"
def lifecycle_version = "2.0.0"
// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
//ROOM DATABASE
def room_version = "2.0.0-beta01"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
.....
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
After crashed deployed again it worked. But when I deployed again it crashed. This happens as a cycle. First time deployed-> crashed second-time deployed-> work fine
I want to run the app every time without any run time crash. I cannot find any issues. I have removed maven { url 'https://maven.fabric.io/public' } and test the app but the same result. Nothing changed. I also clean the project and done invalidate the cache and restart but not working. I am looking for a solution. Please help
Remove ext.enableCrashlytics = false from your build.gradle.
If you don't want to upload mapping files for your debug builds, use this:
debug {
minifyEnabled true
firebaseCrashlytics {
mappingFileUploadEnabled false
}
}
To disable Crashlytics for your debug builds, add this to your application class:
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(!BuildConfig.DEBUG)
Related
I have a problem I want to add com.github.PhilJay:MPAndroidChart:v3.1.0. implementation class but gradle reports that it does not find it despite the fact that I added the repositories and the class implementation in both gradle.
I have updated the version of the gradle but gradle still can't find com.github.PhilJay:MPAndroidChart:v3.1.0. implementation
Here's my project level's gradle file :
plugins {
id 'kotlin-android'
id 'com.android.application'
id 'kotlin-kapt'
id 'com.google.gms.google-services'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.wheeler"
minSdk 23
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
dataBinding = true
}
}
dependencies {
implementation 'com.google.firebase:firebase-storage-ktx:20.1.0'
implementation 'com.google.firebase:firebase-database-ktx:20.1.0'
def lifecycle_version = "2.2.0"
// ViewModel
implementation("androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version")
// LiveData
implementation("androidx.lifecycle:lifecycle-livedata:$lifecycle_version")
def room_version = "2.4.2"
implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.1"
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.android.gms:play-services-auth:20.4.0'
implementation 'com.google.firebase:firebase-database-ktx'
implementation platform('com.google.firebase:firebase-bom:31.1.1')
implementation 'com.google.android.material:material:1.6.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
}
Here's my app's gradle file :
buildscript {
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }// Warning: this repository is going to shut down soon
}
dependencies{
// Add the dependency for the Google services Gradle plugin
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.android.tools.build:gradle:7.2.1'
}}
plugins {
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
What's the solution?
You need to add the maven { url "https://jitpack.io" } line to settings.gradle now (depending on the repositoryMode - new projects in Android Studio default to PREFER_SETTINGS, which means it looks for repositories in settings.gradle instead of the other gradle files).
For example:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url "https://jitpack.io" } // add this to get MPAndroidChart
}
}
Hey guys im making an app in kotlin with jetpack compose but when i run the app its gives me this error.
"Execution failed for task ':app:compileDebugKotlin'.
Could not resolve all files for configuration ':app:kotlin-extension'.
Could not find androidx.compose.compiler:compiler:0.1.0-dev07.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/androidx/compose/compiler/compiler/0.1.0-dev07/compiler-0.1.0-dev07.pom
- https://jcenter.bintray.com/androidx/compose/compiler/compiler/0.1.0-dev07/compiler-0.1.0-dev07.pom
- https://jitpack.io/androidx/compose/compiler/compiler/0.1.0-dev07/compiler-0.1.0-dev07.pom
Required by:
project :app
Possible solution:
Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
"
This is my code(build-gradle):
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.github.zsoltk.pokedex"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion "0.1.0-dev07"
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.core:core-ktx:1.3.2'
implementation "androidx.lifecycle:lifecycle-livedata:2.3.1"
implementation 'androidx.ui:ui-framework:0.1.0-dev07'
implementation 'androidx.ui:ui-layout:0.1.0-dev07'
implementation 'androidx.ui:ui-foundation:0.1.0-dev07'
implementation 'androidx.ui:ui-material:0.1.0-dev07'
implementation 'androidx.ui:ui-tooling:0.1.0-dev07'
implementation 'com.github.zsoltk:compose-router:0.7.0'
implementation "io.reactivex.rxjava2:rxjava:2.2.17"
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
buildscript {
ext.kotlin_version = "1.3.61"
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0-alpha14'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// 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
}
Any ideia of what i need to do?
How about adding the dependency it demands?
One needs this Gradle plugin:
https://mvnrepository.com/artifact/androidx.compose.compiler/compiler
And these are the Java dependencies:
https://mvnrepository.com/artifact/androidx.compose
implementation "androidx.compose:compose-compiler:0.1.0-dev17"
It's meanwhile dev17 and not dev7.
When I am implementing firebase admin libraries
it is showing error I have mentioned after my app and project level gradle files below.
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
configurations {
all*.exclude module: 'support-v4' // This removes all other versions of `support-v4` if gets duplicated from all the artifacts.
}
defaultConfig {
applicationId "com.example.trolificnss"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.firebaseui:firebase-ui-auth:6.2.0"
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-admin:6.12.2'
implementation 'com.google.firebase:firebase-analytics:17.2.3'
implementation 'com.google.firebase:firebase-firestore:21.4.1'
implementation 'com.firebaseui:firebase-ui-database:6.2.0'
implementation 'com.firebaseui:firebase-ui-storage:6.2.0'
implementation "com.google.firebase:firebase-firestore:21.4.1"
implementation "com.firebaseui:firebase-ui-firestore:6.2.0"
implementation 'com.firebaseui:firebase-ui-database:6.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.firebaseui:firebase-ui-firestore:6.2.0'
implementation 'com.google.firebase:firebase-storage:19.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.firebaseui:firebase-ui-auth:6.2.0'
implementation 'net.schmizz:sshj:0.10.0'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.google.gms:google-services:4.2.0'
// 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
}
Below is the error message,
In project 'app' a resolved Google Play services library dependency
depends on another at an exact version (e.g. "[1.21. 0]", but isn't
being resolved to that version. Behavior exhibited by the library will
be unknown.
buildscript {
ext.kotlin_version = '1.2.21'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// 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
}
---------------------------------------------------------------------------
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
defaultConfig {
applicationId "org.solamour.myserver"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
resConfigs "auto"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// Conflict with dependency 'com.google.code.findbugs:jsr305' in project ':app'.
// Resolved versions for app (1.3.9) and test app (2.0.1) differ.
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:2.0.1' // Or "1.3.9".
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
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-admin:4.1.6'
implementation 'com.android.support:multidex:1.0.2'
}
take a look at the javadoc for FirebaseOptions Builder in the Android client library:
com.google.firebase.FirebaseOptions.Builder
Now look at the same class from the java Admin SDK (note the URL is different):
com.google.firebase.FirebaseOptions.Builder
Remove this:
implementation 'com.google.firebase:firebase-admin:6.12.2'
You can't effectvely use the Firebase Admin SDK in an Android app. It's meant only for code that runs on backend servers and desktop machines.
Also, you should always make sure your Android client library dependencies are at the current versions shown in the release notes. Your Firebase-UI library versions should also match with the other Firebase libraries.
I have two problems. I am unable to build a release apk either way. When I disable R8 (preferring proguard), the build just goes on forever (sometimes crashing, citing 'out of memory: java heap space'), and when I enable R8, I get the following error:
Unable to find method 'com.android.tools.r8.CompatProguardCommandBuilder.setProguardSeedsConsumer(Lcom/android/tools/r8/StringConsumer;)Lcom/android/tools/r8/R8Command$Builder;'.
My project level build.gradle:
buildscript {
repositories {
google()
mavenLocal()
jcenter()
maven { url "https://maven.google.com" }
maven { url 'http://storage.googleapis.com/r8-releases/raw' }
}
dependencies {
classpath 'com.android.tools:r8:1.5.68'
classpath 'com.android.tools.build:gradle:3.6.0-alpha09'
classpath 'com.google.gms:google-services:4.3.1'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.7.3'
}
}
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
}
repositories {
google()
mavenLocal()
jcenter()
maven { url "https://maven.google.com" }
}
apply plugin: "com.jfrog.artifactory"
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And my project module build.gradle:
apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
}
compileSdkVersion 29
buildToolsVersion '29.0.2'
defaultConfig {
applicationId "XXX"
minSdkVersion 19
targetSdkVersion 29
vectorDrawables.useSupportLibrary = true
signingConfig signingConfigs.release
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles 'proguard.cfg'
}
}
productFlavors {}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
ignoreWarnings true // false by default
quiet true // false by default
abortOnError false
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
api project(':Tableview')
implementation 'com.diogobernardino:williamchart:2.5.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.squareup.okhttp3:okhttp:4.1.0'
implementation 'com.squareup.okio:okio:2.4.0'
implementation 'com.google.android.material:material:1.1.0-alpha09'
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta03'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.emoji:emoji:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'androidx.media:media:1.1.0-rc01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.fasterxml.jackson.core:jackson-core:2.10.0.pr1'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.10.0.pr1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.0.pr1'
implementation 'commons-io:commons-io:2.6'
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'org.apache.commons:commons-text:1.6'
implementation 'petrov.kristiyan:colorpicker-library:1.1.10'
implementation 'com.google.android.libraries.places:places:2.0.0'
}
apply plugin: 'com.google.gms.google-services'
gradle.properties:
android.enableJetifier=true
artifactory_user=admin
android.useAndroidX=true
android.enableBuildCache=true
org.gradle.jvmargs=-Xmx1g
Both the jvmargs and dexOptions heap size were put there as an attempt to fix the 'java heap space' problem, which they did not.
Removing the line classpath 'com.android.tools:r8:1.5.68' should solve the problem, as that will make the Android Gradle Plugin use the version of R8 which it has built-in.
The issue is that you are using an R8 distribution version 1.5.68 (classpath 'com.android.tools:r8:1.5.68') together with the Android Gradle Plugin version 3.6.0-alpha09 (classpath 'com.android.tools.build:gradle:3.6.0-alpha09'). The API that is missing was introduced in version 1.6.x of R8 (this CL).
After upgrading my android studio and gradle plugin to the latest version, i tried to build my project apk but i got this error "Cause: com/android/tools/r8/com/google/common/collect/ImmutableMultiset", i'm lost and couldn't find anything related to "ImmutableMultiset" on google search. Can anyone help me out Please?
I have tried Invalidate caches, yet not solved..
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'
classpath 'io.fabric.tools:gradle:1.29.0'
// 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
}
and
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.talkbiz.naijaexamspreparations"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
debuggable false
jniDebuggable false
renderscriptDebuggable false
pseudoLocalesEnabled false
zipAlignEnabled true
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:support-core-utils:28.0.0"
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0-alpha08'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.firebase:firebase-auth:18.1.0'
implementation 'com.google.firebase:firebase-firestore:20.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta01'
implementation 'com.github.antonKozyriatskyi:CircularProgressIndicator:1.3.0'
implementation 'com.maltaisn:calcdialog:1.4.1'
implementation 'com.facebook.android:facebook-login:[5,6)'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'de.psdev.formvalidations:formvalidations:1.2.0'
implementation 'com.firebaseui:firebase-ui-firestore:5.0.0'
implementation 'androidx.paging:paging-runtime:2.1.0'
implementation 'io.supercharge:shimmerlayout:2.1.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'de.hdodenhof:circleimageview:3.0.0'
}
apply plugin: 'com.google.gms.google-services'
I fixed this issue with the below steps:
Go to "C:\Users{username}.gradle\caches" folder
And delete all the files.
Then try