<bdo id='zUfXS'></bdo><ul id='zUfXS'></ul>

  • <small id='zUfXS'></small><noframes id='zUfXS'>

      <tfoot id='zUfXS'></tfoot>
    1. <legend id='zUfXS'><style id='zUfXS'><dir id='zUfXS'><q id='zUfXS'></q></dir></style></legend>

        <i id='zUfXS'><tr id='zUfXS'><dt id='zUfXS'><q id='zUfXS'><span id='zUfXS'><b id='zUfXS'><form id='zUfXS'><ins id='zUfXS'></ins><ul id='zUfXS'></ul><sub id='zUfXS'></sub></form><legend id='zUfXS'></legend><bdo id='zUfXS'><pre id='zUfXS'><center id='zUfXS'></center></pre></bdo></b><th id='zUfXS'></th></span></q></dt></tr></i><div id='zUfXS'><tfoot id='zUfXS'></tfoot><dl id='zUfXS'><fieldset id='zUfXS'></fieldset></dl></div>

        Android 无法扩展 Firebase 消息服务

        时间:2024-08-24
      1. <tfoot id='EWDEa'></tfoot>
      2. <i id='EWDEa'><tr id='EWDEa'><dt id='EWDEa'><q id='EWDEa'><span id='EWDEa'><b id='EWDEa'><form id='EWDEa'><ins id='EWDEa'></ins><ul id='EWDEa'></ul><sub id='EWDEa'></sub></form><legend id='EWDEa'></legend><bdo id='EWDEa'><pre id='EWDEa'><center id='EWDEa'></center></pre></bdo></b><th id='EWDEa'></th></span></q></dt></tr></i><div id='EWDEa'><tfoot id='EWDEa'></tfoot><dl id='EWDEa'><fieldset id='EWDEa'></fieldset></dl></div>

          <tbody id='EWDEa'></tbody>

          <small id='EWDEa'></small><noframes id='EWDEa'>

            <bdo id='EWDEa'></bdo><ul id='EWDEa'></ul>
              <legend id='EWDEa'><style id='EWDEa'><dir id='EWDEa'><q id='EWDEa'></q></dir></style></legend>
                  本文介绍了Android 无法扩展 Firebase 消息服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试在我的应用程序中实现 Firebase 云消息传递,我已经实现了使用此服务的所有设置,但是当我尝试在我的类中扩展 FirebaseMessagingService 时,它给了我错误并且它可以根本找不到,连import com.google.firebase.messaging.FirebaseMessagingService如图:

                  I am trying to implement Firebase Cloud Messaging in my application, I had implemented all settings to use this service, but when I try to extend FirebaseMessagingService in my class it gives me error and it can't find it at all, I can't even import com.google.firebase.messaging.FirebaseMessagingService as shown in the picture:

                  我已经添加了所有需要的代码:我将此添加到应用程序 gradle

                  I had added all the code required: I added this to app gradle

                  compile 'com.google.firebase:firebase-core:9.4.0' 
                  apply plugin: 'com.google.gms.google-services'
                  

                  这个到模块 gradle:

                  and this to the module gradle:

                  classpath 'com.google.gms:google-services:3.0.0'
                  

                  这是清单代码:

                  <application
                      android:allowBackup="true"
                      android:icon="@mipmap/ic_launcher"
                      android:label="@string/app_name"
                      android:supportsRtl="true"
                      android:theme="@style/AppTheme">
                      <activity android:name=".MainActivity">
                          <intent-filter>
                              <action android:name="android.intent.action.MAIN" />
                  
                              <category android:name="android.intent.category.LAUNCHER" />
                          </intent-filter>
                      </activity>
                      <service
                          android:name=".MyFirebaseMessagingService">
                          <intent-filter>
                              <action android:name="com.google.firebase.MESSAGING_EVENT"/>
                          </intent-filter>
                      </service>
                      <service
                          android:name=".MyFirebaseInstanceIDService">
                          <intent-filter>
                              <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
                          </intent-filter>
                      </service>
                  </application>
                  

                  然后我将 google json 文件添加到应用程序中.所以如果有人可以帮助我,请

                  and I added the google json file to the app. So if anybody can help me please

                  推荐答案

                  如果要使用消息传递,则必须添加消息传递模块.现在你只添加了核心模块.

                  If you want to use messaging, you have to add the messaging module. Right now you only added the core module.

                  所以继续,包括

                  compile 'com.google.firebase:firebase-messaging:9.4.0'
                  

                  所有可用的模块都可以在 https://firebase.google.com 的底部找到/docs/android/setup

                  All the available modules can be found at the bottom of https://firebase.google.com/docs/android/setup

                  这篇关于Android 无法扩展 Firebase 消息服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:通过 FCM onMessageReceived 方法从 RemoteMessage 获取值 下一篇:如何通过 Firebase 从用户向用户发送直接消息?

                  相关文章

                1. <i id='2bdhr'><tr id='2bdhr'><dt id='2bdhr'><q id='2bdhr'><span id='2bdhr'><b id='2bdhr'><form id='2bdhr'><ins id='2bdhr'></ins><ul id='2bdhr'></ul><sub id='2bdhr'></sub></form><legend id='2bdhr'></legend><bdo id='2bdhr'><pre id='2bdhr'><center id='2bdhr'></center></pre></bdo></b><th id='2bdhr'></th></span></q></dt></tr></i><div id='2bdhr'><tfoot id='2bdhr'></tfoot><dl id='2bdhr'><fieldset id='2bdhr'></fieldset></dl></div>

                    <small id='2bdhr'></small><noframes id='2bdhr'>

                    <legend id='2bdhr'><style id='2bdhr'><dir id='2bdhr'><q id='2bdhr'></q></dir></style></legend>

                    <tfoot id='2bdhr'></tfoot>
                      <bdo id='2bdhr'></bdo><ul id='2bdhr'></ul>