问题描述
很长一段时间以来,我一直在从事与离子相关的项目.
I've been working on a project with ionic from a long time.
最近我更新了android studio及其程序包,由于以下问题,我现在无法在android上进行构建:
Recently i updated android studio and it's packages and now i can't build on android anymore because of the following issue:
在更新android studio之前,一切正常.
Before updating android studio everything worked well.
这是一个带有cordova android引擎6.1.2的离子v1应用程序.
This is a ionic v1 app with cordova android engine 6.1.2.
我正在使用Cordova 6.5.0,离子2.2.1.
I'm using cordova 6.5.0, ionic 2.2.1.
我的android环境:sdk工具25.2.3,sdk平台工具26,sdk构建工具26
My android environment: sdk tools 25.2.3, sdk platform tools 26, sdk build tools 26
您是否知道为什么我在编译时仍然出现此错误?
Do you have any idea why i keep getting this error when compiling?
推荐答案
该错误是由不同插件请求的Play服务库版本冲突造成的.
That error is being caused by conflicting versions of the Play Services library being requested by different plugins.
最快的解决方法是安装 cordova-android-play- services-gradle-release 到您的Cordova项目中,这将迫使Gradle对齐版本:
Quickest way to fix is to install cordova-android-play-services-gradle-release into your Cordova project which will force Gradle to align the versions:
cordova plugin add cordova-android-play-services-gradle-release
这篇关于无法在Android上构建应用程序离子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!