새로운 Firebase GCM 구현을 통해 푸시 알림을 구현하려고합니다.Firebase. java.lang.RuntimeException : 수신기 com.google.android.gms.gcm.GcmReceiver를 인스턴스화 할 수 없습니다. java.lang.ClassNotFoundException :
<service
android:name=".services.MyMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service
android:name=".services.MyInstanceIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
을하지만 이러한 서비스도 필요하지 않습니다 : 그것은 아주 간단합니다. 이 플러그인을 적용 : 물론 내가 build.gradle의 끝에서 GCM 클래스의 코드 생성을위한 Gradle을 플러그인을 삽입 'com.google.gms.google-서비스'는 또한 프로젝트 Gradle을 파일이 있습니다
dependencies {
classpath 'com.google.gms:google-services:3.1.0'
}
응용 프로그램을 실행하고 firebase에서 응용 프로그램으로 알림을 보내려고하면 이상한 반사 오류로 인해 충돌이 발생합니다.
java.lang.RuntimeException: Unable to instantiate receiver com.google.android.gms.gcm.GcmReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.gcm.GcmReceiver"
이 오류를 디버깅하는 방법조차 모른다.
이 문제를 @ eugene-verichev에서 해결할 수 있었습니까? – Reinherd
예, 이제 답변을 게시했습니다 –