cannot find symbol import com.google.firebase.iid.FirebaseInstanceIdService error in ionic3

前端 未结 6 1796
礼貌的吻别
礼貌的吻别 2021-01-01 17:26

I Have no idea why I am getting this error whenever I try to create my app\'s build.I have tried many solutions but I was unable to solve this.i don\'t know if any plugins

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-01 18:16

    Yes, it's depreciated. The fix it quite simple, just move the code...

    From onTokenRefresh() in your FirebaseInstanceIdService subclass

    To onNewToken() in your FirebaseMessagingService subclass

    Info on depreciation: https://firebase.google.com/support/release-notes/android#update_-_april_02_2019

    I would recommend making this small code change over using old versions of firebase. Probably a good idea to also migrate to AndroidX [https://developer.android.com/jetpack/androidx/migrate] while you're at it.

提交回复
热议问题