簡體   English   中英

無法在Play控制台和Firebase中生成崩潰報告

[英]crash report not generated in play console and firebase

我的應用崩潰了,但是在某些情況下無法在Firebase中生成崩潰報告。 我在應用程序中添加了手動崩潰,只要單擊該手動崩潰按鈕會生成錯誤,但不會生成某些崩潰。 Play控制台ANR和崩潰也發生了同樣的事情。 我無法追蹤這些問題。 OPPO LollipopSamsung Galaxy設備中發生了這種情況。

崩潰需要一些時間才能顯示在Firebase控制台中,甚至需要幾個小時。 在Play控制台中,有時可能需要一天甚至更長的時間才能顯示出來。

一些要點

  1. 確保您尚未在清單中禁用報告。
  2. 確保您沒有處理異常以忽略它們。
  3. 檢查您是否已從Firebase文檔中導入了最新的依賴項。

不知道這是否是正確的情況,但是如果您有機會設置DefaultUncaughtExceptionHandler ,那么您必須將異常傳遞回UncaughtExceptionHandler

final Thread.UncaughtExceptionHandler defHandler = Thread.getDefaultUncaughtExceptionHandler();
        Thread.setDefaultUncaughtExceptionHandler((t, ex) -> {
            try {
                CrashReportHandler.handleCrash(ex);
            } finally {
                // Pass the exception to the default handler here
                defHandler.uncaughtException(t, ex);
            }
        });
Yash Krishan Verma **code was developed in react native**

apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
        entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
def enableSeparateBuildPerCPUArchitecture = true
def enableProguardInReleaseBuilds = false
android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
    defaultConfig {
        applicationId "com.example.project"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        missingDimensionStrategy "RNN.reactNativeVersion", "reactNative58"
        versionCode 55
        versionName "1.0.13"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
    }
     splits {
        abi {
            enable enableSeparateBuildPerCPUArchitecture
            reset()
            universalApk true  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    buildTypes {
        debug{
            debuggable true
        }

        release {
            debuggable false
        }
    }
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) + defaultConfig.versionCode
            }
        }
    }
    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
    buildToolsVersion '28.0.3'
}
configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-annotations:28.0.0'
    }
}

repositories {
    flatDir {
        dirs 'libs'
        dirs project(':intripperLibrary').file('libs')
    }
}

dependencies {
    implementation project(':react-native-fast-image')
    implementation project(':react-native-sms-retriever')
    implementation project(':react-native-config')
    implementation project(':react-native-reanimated')
    implementation project(':react-native-android-fullscreen-webview-video')
    implementation project(':react-native-image-crop-picker')
    implementation project(':react-native-orientation')
    implementation project(':react-native-oauth')
    implementation project(':react-native-google-signin')
    implementation project(':react-native-fbsdk')
    implementation project(':react-native-geolocation-service')
    implementation(project(':react-native-geolocation-service')) {
        exclude group: 'com.google.android.gms', module: 'play-services-location'
    }
    implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
        transitive = true
    }
    implementation 'com.google.android.gms:play-services-location:+'
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation project(':react-native-device-info')
    implementation project(':react-native-android-wifi')
    implementation project(':react-native-splash-screen')
    implementation project(':react-native-firebase')
    implementation project(':react-native-gesture-handler')
    implementation project(':intripperLibrary')
    implementation project(':react-native-camera')
    implementation(project(':react-native-maps')){
        exclude group: 'com.google.android.gms', module: 'play-services-base'
        exclude group: 'com.google.android.gms', module: 'play-services-maps'
    }
    implementation "com.google.android.gms:play-services-base:+"
    implementation "com.google.android.gms:play-services-maps:+"
    implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation 'com.google.firebase:firebase-core:+'
    implementation "com.google.firebase:firebase-messaging:+"
    implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation 'com.google.android.material:material:1.0.0-beta01'
    implementation 'com.facebook.fresco:webpsupport:1.10.0'
    implementation 'com.facebook.fresco:fresco:1.10.0'
    implementation 'com.facebook.fresco:animated-gif:1.10.0'
    implementation 'androidx.legacy:legacy-support-core-utils:1.0.0-beta01'
    implementation 'androidx.annotation:annotation:1.0.0-beta01'
    implementation 'androidx.multidex:multidex:2.0.0'
    implementation 'com.parse:parse-android:1.13.1'
    implementation 'com.google.maps.android:android-maps-utils:0.5+'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
    implementation 'com.google.firebase:firebase-analytics'
    implementation project(':react-native-razorpay')
    implementation project(path: ':crashreporter')
}
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: "com.android.application"
apply plugin: "io.fabric"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM