[英]Ionic Cordova build android fails at :processDebugGoogleServices due to “No matching client found for package name 'io.ionic.starter'”
我正在使用Ionic框架来构建移动应用程序。
当我要完成应用程序时,构建失败。
输出如下所示。
Parsing json file: /Users/plum/Documents/Projects/bci-project/app/platforms/android/google-services.json
:processDebugGoogleServices FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugGoogleServices'.
> No matching client found for package name 'io.ionic.starter'
在google.services.json
,它是以下内容:
{
"project_info": {
"project_number": "123",
"firebase_url": "https://cordova-plugin-firebase.firebaseio.com",
"project_id": "cordova-plugin-firebase",
"storage_bucket": "cordova-plugin-firebase.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:123:android:123",
"android_client_info": {
"package_name": "com.github.cordova_plugin_firebase"
}
},
"oauth_client": [
{
"client_id": "123.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "123"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
我尝试编辑google.services.json
以更改程序包名称以与config.xml
匹配,但是当我再次构建时, google.services.json
恢复为以前的状态。
尝试使用正确的程序包名称将google-services.json复制到项目的根文件夹中,然后进行构建。 也许您需要再次删除并添加android平台
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.