更新时间:2023-11-20 09:49:22
我能够解决这个问题.虽然我发现很多建议都围绕着安装缺少的存储库(您需要 Android 支持存储库、库、Play 服务和 Google 存储库),但我已经准备好了.缺少的是当我使用此命令添加插件时,在 project.properties 中指定了不正确的版本:
I was able to resolve the issue. While a lot of the suggestions I found revolved around installing missing repositories (you need Android Support Repository, Library, Play Services and Google Repository), I had all that in place. What was missing was that incorrect versioning is specified in project.properties when I used this command to add the plugin:
ionic plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"
在 project.properties 中,我改变了这个:
In project.properties, I changed this:
cordova.system.library.4=com.google.android.gms:play-services-maps:9.8.0
cordova.system.library.5=com.google.android.gms:play-services-location:9.8.0
到这里:
cordova.system.library.4=com.google.android.gms:play-services-maps:+
cordova.system.library.5=com.google.android.gms:play-services-location:+
这解决了构建错误.