无法发送Firebase崩溃报告

时间:2017-03-31 17:28:13

标签: firebase firebase-crash-reporting

我已配置Firebase崩溃报告。日志显示初始化成功,但是当我通过调用测试异常发送报告异常时:

FirebaseCrash.report(new Exception("Oppss!!!"));

我得到了这个例外:

  

E / FirebaseCrash:发送崩溃报告时出错

     

bmk:服务器未收到报告:Origin错误消息:调用方没有权限

我的build.gradle是

 apply plugin: 'com.android.application'
 apply plugin: 'android-apt'
 apply plugin: 'com.google.firebase.firebase-crash' 

 android {
compileSdkVersion 24
buildToolsVersion "24.0.0"

repositories {
    mavenCentral()
}

defaultConfig {
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    applicationId "My_APP_ID"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 8
    versionName "2.4"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')

testCompile 'junit:junit:4.12'
testCompile 'org.json:json:20140107'
androidTestCompile 'com.android.support:support-annotations:24.0.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-  18:2.1.2'


apt 'com.jakewharton:butterknife-compiler:8.2.1'

compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'me.relex:circleindicator:1.1.5@aar'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.jakewharton:butterknife:8.2.1'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.github.satyan:sugar:1.4'
compile 'com.daimajia.swipelayout:library:1.2.0@aar'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'com.google.firebase:firebase-core:10.2.0'                        
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.google.firebase:firebase-crash:10.2.0'
compile 'com.pixplicity.easyprefs:library:1.8.1@aar'
compile 'com.google.android.gms:play-services-tagmanager:10.2.0'
}


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

google-services.json内容为:

{
"project_info": {
"project_number": "216634835644",
"firebase_url": "https://my_firebase_url.firebaseio.com",
"project_id": "project_id",
"storage_bucket": "project_id.appspot.com"
},
"client": [
{
  "client_info": {
    "mobilesdk_app_id": "1:216634835644:android:ac839bfe454896ad",
    "android_client_info": {
      "package_name": "my package name"
    }
  },
  "oauth_client": [
    {
      "client_id": "my_client_id",
      "client_type": 3
    }
  ],
  "api_key": [
    {
      "current_key": "My_api_key"
    }
  ],
  "services": {
    "analytics_service": {
      "status": 1
    },
    "appinvite_service": {
      "status": 1,
      "other_platform_oauth_client": []
    },
    "ads_service": {
      "status": 2
    }
  }
}
],
"configuration_version": "1"
}

0 个答案:

没有答案