updating the version of com.google.android.gms

在ionic 2應用firebase的開發中,如果混合多種plug-in(如push、iap、admob),會發生內部引用LIB的異常,如果遇到以下的錯誤警示:

Execution failed for task ':processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.0.1.


解法:
1. 在/project/platforms/android/project.properties 中,將相關的都改成提示的版本
cordova.system.library.3=com.google.firebase:firebase-messaging:11.0.1
cordova.system.library.4=com.google.android.gms:play-services-base:11.0.1
cordova.system.library.5=com.google.android.gms:play-services-ads:11.0.1

2. 這個方式,預計在遇到 ionic cordova platofrm remove android 時,會需要重新修正。

留言

熱門文章