While creating a Xamarin Android application, after adding the reference to Infragistics Chart control and the Google Play services, we had to enable the 'Enable Multi-Dex' property to true
(Since the app hit the dex method limit of 65K).
We are getting an error
..\CREATEMULTIDEXMAINDEXCLASSLIST: Error: Expecting class path separator ';' before '\Android\android-sdk\build-tools\21.1.1\lib\shrinkedAndroid.jar' in argument number 8
I am using Xamarin Studio Version 5.9 (build 431) Xamarin.Android Version: 5.1.0
Please help to fix this Issue in Xamarin.
MultiDex is a technique of splitting your application code into multiple . dex files – each containing at most 65 KB of bytecode. To enable MultiDexing in Xamarin. Android just go to your project settings and check “Enable Multi-Dex” (pic rel.)
In Android, the compilers convert your source code into DEX files. This DEX file contains the compiled code used to run the app. But there is a limitation with the DEX file. The DEX file limits the total number of methods that can be referenced within a single DEX file to 64K i.e. 65,536 methods.
We had the same problem on our build server, and we've had to move the Android SDK to a path with no spaces e.g. C:\android-sdk\...
Obviously we needed to update the ANDROID_HOME
environment variable to the new path, and set the SDK paths in Xamarin Studio and Visual Studio.
This has solved the problem for us.
For those who don´t want to change the Android SDK actual location plus ANDROID_HOME env variable, a simple link is enough:
mklink /D "C:\android-sdk" "C:\Program Files (x86)\Android\android-sdk"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With