Cordova Plugin Firebase not working with Ionic 3 run android

自闭症网瘾萝莉.ら 提交于 2019-12-08 11:13:03

问题


I am doing a test app using the plugin cordova-plugin-firebase to do Push Notifications, following this tutorial: https://angularfirebase.com/lessons/ionic-native-with-firebase-fcm-push-notifications-ios-android/ . The problem appears when I try to compile the project with android with the following command: ionic cordova run android giving me a build failed where the error is the follows: Could not find support-v4.aar (com.android.support:support-v4:26.1.0). Do you guys have some idea about this error? Thank you.


回答1:


You need to do some changes in your build.gradle file inside platforms/android and need to add maven { url 'https://maven.google.com' } before the jcenter() as follows:

allprojects { 
  repositories { 
    mavenCentral()
    maven { url 'https://maven.google.com' } //add this code
    jcenter() 
  } 
}


来源:https://stackoverflow.com/questions/51196432/cordova-plugin-firebase-not-working-with-ionic-3-run-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!