Android Question Getting "Too many field references to fit in one dex file" after reinstalling SDKs

JohnC

Expert
Licensed User
Longtime User
I reinstalled my SDKs to fix an Emulator problem.

Then I got Androidx related issues because I am using b4A 9.01 and the "References.zip" file seems to be designed to work with v9.3.

I do not want to upgrade to 9.3 at this time out of concern there will be "new " problems I will have ot spend time fixing.

So, I downloaded the "Ready To Run SDK" zip file from this page for the older "8.0+" versions of B4A:

https://www.b4x.com/android/forum/threads/ready-to-run-sdk.99780/

I then did the download of recommended SDK's using the SDK manager.

Now, when I try to compile my app, I am getting this error:

B4X:
trouble writing output: Too many field references to fit in one dex file: 72281; max is 65536.
You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.

Since I did not have this error before I reinstalled the SDK, I don't want to use the #MultiDex: True flag because of "Don't use this feature if not needed. Compilation will be a bit slower and there are no benefits."

So, what is causing this error all of the sudden and how can I fix it other then the flag?

(P.S. I do not want to upgrade to B4A 9.3 just yet)
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…