简体   繁体   中英

Impossible to build app ionic on android

I've been working on a project with ionic from a long time.

Recently i updated android studio and it's packages and now i can't build on android anymore because of the following issue:

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/iid/zzc.class

Before updating android studio everything worked well.

This is a ionic v1 app with cordova android engine 6.1.2.

I'm using cordova 6.5.0, ionic 2.2.1.

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?

That error is being caused by conflicting versions of the Play Services library being requested by different plugins.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM