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

前端 未结 6 1789
礼貌的吻别
礼貌的吻别 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 17:59

    After serveral tests, my solution was change cordova-plugin-firebase by cordova-plugin-firebasex. https://github.com/dpa99c/cordova-plugin-firebase#migrating-from-cordova-plugin-firebase

    rm -Rf platforms/android
    cordova plugin rm cordova-plugin-firebase
    rm -Rf plugins/ node_modules/
    npm install
    cordova plugin add cordova-plugin-firebasex
    cordova platform add android
    

    I hope this helps.

    https://github.com/dpa99c/cordova-plugin-firebase#androidx

    This plugin has been migrated to use AndroidX (Jetpack) which is the successor to the Android Support Library. This is implemented by adding a dependency on cordova-plugin-androidx which enables AndroidX in the Android platform of a Cordova project.

    This is because the major release of the Firebase and Play Services libraries on 17 June 2019 were migrated to AndroidX.

    Therefore if your project includes any plugins which are dependent on the legacy Android Support Library, you should add cordova-plugin-androidx-adapter to your project. This plugin will dynamically migrate any plugin code from the Android Support Library to AndroidX equivalents.

提交回复
热议问题