我想實現火力地堡雲端通訊在我的申請,我已經實現的所有設置使用這項服務,但是當我試圖在我的課擴展FirebaseMessagingService
它給我的錯誤,它可以而她不知道它在所有,我甚至可以import com.google.firebase.messaging.FirebaseMessagingService
如不是在圖片:的Android無法擴展火力地堡消息服務
我又增加了所需的所有代碼: 我加入這個APP的gradle這個
compile 'com.google.firebase:firebase-core:9.4.0'
apply plugin: 'com.google.gms.google-services'
和這對模塊的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>
和我增加了谷歌JSON文件到該應用。 所以,如果有人能幫助我,請
無效緩存\重新啓動Android Studio中幫助過我的底部找到.. – NitZRobotKoder