DM developing
DM developing

Reputation: 463

Can not see crashes for Android on AppGallery Connect

We are having problem with integrating crash kit into our existing project, where we have productFlavors, one is google and second is hms. Everything works fine, site kit, place kit, map is showing. But somehow we can not see any crash on AppGallery. We have followed integration tutorial and still no luck. Here is the code:

build.gradle.app ->

apply plugin: 'com.android.application'
//apply plugin: 'com.huawei.agconnect'
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Huawei")) {
    apply plugin: 'com.huawei.agconnect'
    println 'Huawei plugins loading'

} else {
    println 'Google plugins loading'

    apply plugin: 'com.google.firebase.crashlytics'
    apply plugin: 'com.google.gms.google-services'
}
apply plugin: 'dexguard'
.
.
.
.
    buildTypes {
        debug {
            proguardFile getDefaultDexGuardFile('dexguard-release.pro')
            proguardFile 'dexguard-project.txt'
//            minifyEnabled true
//            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        release {
            proguardFile getDefaultDexGuardFile('dexguard-release.pro')
            proguardFile 'dexguard-project.txt'
            if (getGradle().getStartParameter().getTaskRequests().toString().contains("Google")) {
                println 'Google crashlytics loading for release'

                firebaseCrashlytics.mappingFileUploadEnabled true
                firebaseCrashlytics {
                    nativeSymbolUploadEnabled true
                }
            }

        }
    }
.
.
.
.
    flavorDimensions "appID", "provider"
    productFlavors {

        huawei {
            dimension "provider"
        }
        google {
            dimension "provider"

        }

    }
.
.
.
.
dependencies {
    implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
// some google implementations
.
.
    // HUAWEI
    huaweiImplementation 'com.huawei.agconnect:agconnect-core:1.4.1.300'
    huaweiImplementation 'com.huawei.hms:maps:5.0.1.300'
    huaweiImplementation 'com.huawei.hms:location:5.0.0.301'
    huaweiImplementation 'com.huawei.hms:site:5.0.3.302'

    huaweiImplementation 'com.huawei.hms:hianalytics:5.0.3.300'
    huaweiImplementation 'com.huawei.agconnect:agconnect-crash:1.4.1.300'
}

build.gradle top level ->


buildscript {

    repositories {
        maven { url 'http://developer.huawei.com/repo/' }

        google()
        jcenter()
       flatDir {
            dirs 'app/libs/dexguard','app/libs/mylib'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.3'
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
        classpath 'com.guardsquare.dexguard:dexguard-gradle-plugin:'

        //HUAWEI
        classpath 'com.huawei.agconnect:agcp:1.4.1.300'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

        maven { url "https://maven.google.com" }
        maven { url "https://jitpack.io" }
        maven { url 'http://developer.huawei.com/repo/' }


        flatDir {
            dirs 'libs'
        }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Also, agconnect-servise.json file is under app folder in project(the latest one). Also, analytics service is enabled in project on AppGallery. We have copy/pasted test crash code in fragment to check it and app crashed, but crashes are not showing. Also followed the protocol, wi-fi on, crash it, reopen app and do not crash it again in five sec!

Upvotes: 1

Views: 1662

Answers (3)

EAntillanca
EAntillanca

Reputation: 13

Can you check if you have configured a data storage location for your app in App Gallery? It seems you need to set that first, and then download the agconnect-services.json file.

Upvotes: 0

Nithin
Nithin

Reputation: 972

Huawei crash analytics is a primary crash reporting solution for mobile. It monitors and captures your crashes, intelligently analyses them, and then groups them into manageable issues. To know step by step process of Crash Kit integration on HMS, you can follow the given articles

Introduction to AppGallery Connect Crash Service

Online Food ordering app (Eat@Home) | Crash Service | Push kit | JAVA Part-5

Upvotes: 0

zhangxaochen
zhangxaochen

Reputation: 33997

Different from Map Kit, Site Kit or other HMS Core Kits, the Crash service of AppGallery Connect is without the need for coding. There is no need to check whether GMS/HMS is available and then make the logical judgment.

Huawei Crash SDK supports both GMS and HMS phones, you are advised to integrate it directly. After the Crash SDK is integrated into your app, it will automatically report crash data to AGC when your app crashes.

Update:

Please check the following part.

  1. Check if you can see crash report on Search by user not Statistics. Search by user
  2. Check whether you update the json file.

Upvotes: 1

Related Questions