Android build fails for a fresh new project: Too many classes in --main-dex-list, main dex capacity exceeded

Using current expokit 28.0.0

  1. Created new project in XDE
  2. did “exp detach”
  3. started a build in Android Studio

Expected result: build is successful.

Actual result: Too many classes in --main-dex-list, main dex capacity exceeded

Looks like this issue is haunting around for at least 2 years. Would be very nice to have a solution once and for all. Moreover a build is working fine at expo.io.

Hey @alexsmit . Could you make sure you’re using the dev built variant instead of dev19? This is set in a toolbar in the bottom left corner of Android Studio. There is an ongoing issue where debug builds don’t always run on older Android devices (Android 5 or older, I believe), but it sounds like you’re running into a compile-time error, which is different.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.