Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio (0.1.6-0.2.13) non-jumbo instruction error

I've encountered a problem after upgrading from Android Studio 0.1.5 to 0.1.6 (also from 0.1.6 to 0.2.13) where my build failed with the following error:
Unable to execute dex: Cannot merge new index some_number > 2^16 into a non-jumbo instruction!

I've set the following line in the project.properties file:
set dex.force.jumbo=true
(both with set and without) and this did not fix the issue.

Any ideas?

like image 296
Assaf Gamliel Avatar asked Mar 24 '23 10:03

Assaf Gamliel


1 Answers

I've fixed it by going to the Preferences (/Ctrl+,) ➤ Compiler and unchecking the "Use external build".
I then went to Build ➤ Rebuild Project and it worked fine.

I hope this will help someone else too.

Edit:
Please note that since Android Studio 0.2.13 (I didn't use anything between 0.2.9 and 0.2.13 so I haven't noticed when it went away) There is no "Use external build" option.
To overcome this issue now you need to do this:
Go to the Preferences (/Ctrl+,) ➤ Compiler ➤ Android Compilers and check the "Force jumbo mode".

like image 133
Assaf Gamliel Avatar answered Apr 06 '23 17:04

Assaf Gamliel