Member-only story

Ionic Android Error while merging dex archives — Unable to merge dex in Ionic.

Ankit Maheshwari
1 min readJun 3, 2020

--

Error: Unable to merge dex in Ionic.

This error usually comes when we use Google’s plugin in Ionic Cordova. (Example: when using Firebase FCM plugin)

My articles are open for everyone; non-member readers can read the article by clicking this Friend link.

To fix this —

Install couple of androidx plugins to solve the issue. So simply run the following commands in your project root:

  1. Add plugin to enable AndroidX in the project
ionic cordova plugin add cordova-plugin-androidx

2. Add plugin to patch existing plugin source that uses the Android Support Library to use AndroidX

ionic cordova plugin add cordova-plugin-androidx-adapter

3. Now run the following commands in your project root:

cordova clean
ionic cordova build android

Forum discussion:
https://forum.ionicframework.com/t/unable-to-merge-dex-in-ionic/119518/72

Hope this helps!

See you later 👋👋

Feel free to comment down in the comment box.
Stay connected for more articles:
https://medium.com/@AnkitMaheshwariIn

If you wouldn’t mind giving it some claps 👏 👏 since it helped, I’d greatly appreciate it :) Help others find the article, so it can help them!

Always be clapping…

--

--

Ankit Maheshwari
Ankit Maheshwari

Responses (2)