sarriaroman / photoviewer

PhotoViewer Cordova Plugin
MIT License
155 stars 202 forks source link

Ionic 3 Build / Run Android is not working #189

Closed cr1pt0r0 closed 4 years ago

cr1pt0r0 commented 4 years ago

Hi, I have been using this plugin before without any issue, but now I can't seem to build / run it on Android. I have been getting an error on

FAILURE: Build failed with an exception.

Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED

  • What went wrong: 34 actionable tasks: 9 executed, 25 up-to-date Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy

I have tried the steps below:-

Do let me know if you are able to get it to work on a freshly installed Ionic 3. Thanks!

cr1pt0r0 commented 4 years ago

Nevermind! It’s actually because of Android has the latest build package and conflicted with Androidx package. I have resolved it by installing certain plugins as below:-

ionic cordova plugin add cordova-plugin-androidx ionic cordova plugin add cordova-plugin-androidx-adapter