Google 播放服务:构建离子 android 应用程序时出错

Google Play services: Error while building ionic android app

我正在创建新的离子应用程序。在这个应用程序中,我添加了 Google Play services 包修订号。 31. 还在我的应用程序中添加了包 cordova plugin add cordova-plugin-googleplus。这用于 google 加上身份验证。
所以现在我在使用 ionic build android 构建 android 应用程序时遇到问题。它给了我以下错误,

但是当我删除包 cordova plugin remove cordova-plugin-googleplus 并构建应用程序时它成功了。

是因为googleplus包的修订号吗?

问题是因为您 Android SDK 没有安装 Google Play 服务。因此,它无法编译具有 Google Play Services 引用的应用程序(而 Android SDK 没有这些)。转到您的 Android SDK 管理器并为您的 android API 版本安装 Google Play 服务。 PS 您可以在控制台中看到这些错误。

找到解决方案,
我已将以下软件包降级到以前的版本。

请记住,如果您使用 windows 以反映 android sdk 中的更改,您需要重新启动计算机。

这个错误是因为这个应用没有使用androidX但是这些插件解决了errors.Use这两个插件。它解决了我的问题ionic cordova plugin add cordova-plugin-androidx && ionic cordova plugin add cordova-plugin-androidx-adapter