0

i want to get notifications in firebase crashlytics when my app is crashing , but it's not working.

When i run command: sudo ./gradlew crashlyticsUploadSymbolsDebug --stacktrace in terminal for upload symbols, i am getting error : Execution failed for task ':app:compileDebugJavaWithJavac'.

javax/xml/bind/JAXBException

and this URL https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings I am using below code in build.gradle

buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:1.28.1'
}
}
apply plugin: 'com.android.application'

apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'

// Enable Crashlytics NDK reporting
crashlytics {
enableNdk true

}

dependencies {
// ...

implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

// Add the Crashlytics NDK dependency
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.1.1'
}
repositories {
maven { url 'https://maven.fabric.io/public' }
}

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.stepglobal.smartdriver"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
setProperty("archivesBaseName", applicationId + "-v" + versionCode + "(" + versionName + ")")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

dataBinding {
enabled = true
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
implementation 'androidx.appcompat:appcompat-resources:1.1.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.cardview:cardview: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.squareup.retrofit2:retrofit:2.5.0'

implementation 'com.google.dagger:dagger:2.22.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.22.1'

implementation 'com.google.firebase:firebase-messaging:19.0.1'

implementation 'androidx.work:work-runtime:2.0.1'

implementation 'androidx.room:room-runtime:2.1.0'
annotationProcessor 'androidx.room:room-compiler:2.1.0'

implementation 'com.google.code.gson:gson:2.8.5'
// For Image Compressor
implementation 'id.zelory:compressor:2.1.0'

implementation 'com.squareup.picasso:picasso:2.71828'

implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

implementation('com.crashlytics.sdk.android:crashlytics:2.10.0@aar') {
transitive = true;
}
implementation 'androidx.gridlayout:gridlayout:1.0.0'

testImplementation 'org.json:json:20140107'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.amitshekhar.android:android-networking:1.0.2'
implementation 'io.apisense:rhino-android:1.1.1'
implementation 'commons-io:commons-io:2.4'
implementation 'com.squareup.okhttp3:okhttp:3.3.1'
}
  • Have you initialized crashlytic class in your application class? – Rajat Beck Oct 31 '19 at 11:43
  • yes i have initialized crashlytic class . – prabhu nath tiwary Oct 31 '19 at 11:58
  • Have you followed [this](https://firebase.google.com/docs/crashlytics/get-started?platform=android), I think you are missing some dependencies at project level gradle folder. – Rajat Beck Oct 31 '19 at 12:10
  • Yeah i have follow this docs – prabhu nath tiwary Oct 31 '19 at 13:08
  • @RajatBeck here is code : 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.2' classpath 'io.fabric.tools:gradle:1.31.2' } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } – prabhu nath tiwary Oct 31 '19 at 13:14
  • Hi prabhu, could you add more information about exactly the issues that you're running into? There appear to be two separate questions in your original post, 1. why do I get an error when running sudo ./gradlew crashlyticsUploadSymbolsDebug --stacktrace, and 2. why am I not getting notifications in Firebase when Crashlytics reports an issue. – Kevin Kokomani Nov 12 '19 at 21:02
  • @kevin, issue resolved , Thanks... – prabhu nath tiwary Dec 11 '19 at 07:44

0 Answers0