升级到Firebase并且现在有许多问题重新启动应用

时间:2016-06-11 07:09:11

标签: android firebase android-anr-dialog firebase-crash-reporting

我最近从gcm升级到firebase。这迫使我升级我的构建工具等。该应用程序使用Play服务来检查订阅状态,另外,它是一个基本的Push To Talk应用程序。使用构建工具22,GCM上的一切运行正常。。我已经实施了firebase,它运行正常。我遇到的问题是我现在启动的哪三项活动或者从哪里(小部件,通知,图标)导致ANR。请注意,我第一次启动他们按预期运行的活动。第二次启动的任何活动都会给出ANR。这是怎么回事?

记录错误

06-11 02:45:49.913 32009-32009/com.cb3g.channel19 W/DisplayListCanvas: DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
06-11 02:45:59.883 32009-32030/com.cb3g.channel19 E/DynamiteModule: Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor" on path: DexPathList[[zip file "/data/app/com.cb3g.channel19-3/base.apk"],nativeLibraryDirectories=[/data/app/com.cb3g.channel19-3/lib/arm64, /vendor/lib64, /system/lib64]]
06-11 02:45:59.883 32009-32030/com.cb3g.channel19 W/ResourcesManager: getTopLevelResources: /data/app/com.google.android.gms-2/base.apk / 1.0 running in com.cb3g.channel19 rsrc of package com.google.android.gms
06-11 02:49:36.923 32009-32009/com.cb3g.channel19 W/AudioManager: setStreamMute is deprecated. adjustStreamVolume should be used instead.

的build.gradle:

android {
    signingConfigs {
        config {

        }
    }
    defaultConfig {
        applicationId "com.cb3g.channel19"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 278
        versionName "2.1"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    compileSdkVersion 23
    buildToolsVersion '22.0.1'
}

dependencies {
    compile 'com.squareup.okhttp3:okhttp:3.3.1'
    compile 'com.google.firebase:firebase-messaging:9.0.2'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.google.android.gms:play-services-gcm:9.0.2'
    compile 'com.google.android.gms:play-services:9.0.2'
    compile 'com.google.android.gms:play-services-ads:9.0.2'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:design:23.4.0'
}
apply plugin: 'com.google.gms.google-services'

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.cb3g.channel19">

    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.android.vending.BILLING" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
    <uses-permission android:name="android.permission.CLEAR_APP_CACHE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        android:allowBackup="false"
        android:icon="@drawable/smallicon"
        android:label="@string/app_name"
        android:persistent="true"
        android:theme="@style/mytheme"
        android:value="AIzaSyadfadfaLJKLKJkldfk">

        <activity
            android:name=".main_activity"
            android:launchMode="singleTask"
            android:stateNotNeeded="true"
            android:windowSoftInputMode="adjustNothing|stateAlwaysHidden"/>

        <activity
            android:name=".settings_activity"
            android:stateNotNeeded="true"
            android:theme="@style/pmstyle"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/>

        <activity
            android:name=".login_activity"
            android:stateNotNeeded="true"
            android:theme="@style/mytheme"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter android:priority="247483647">
            <action android:name="android.intent.action.VOICE_COMMAND" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        </activity>

        <service
            android:name=".radio_service"
            android:exported="false"/>

        <service
            android:name=".MyFcmListenerService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <receiver android:name=".channel19">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/channel19_info" />
        </receiver>
    </application>

</manifest>

返回活动后会导致ANR的原因是什么?

更新:没有Firebase编译应用程序正确运行。我添加了firebase崩溃编译试图获取Firebase日志的情况无济于事这里是依赖项。

`compile 'com.google.firebase:firebase-messaging:9.0.2'
`compile 'com.google.firebase:firebase-crash:9.0.2'

0 个答案:

没有答案