I'm trying to set multidex for my debug build (on production I use Proguard, but it seems on debug this is not allowed). It works great to solve the 65k limit but the compilation for a clean build it's not acceptable (more than 3 minutes). I'm afraid I'll spend most of the day compiling the project :slightly_smiling_face:
I've hear that targeting API 21 on minSDKVersion should solve this problem (at least for "native" android) since a predexing feature becomes available and this improves compilation times
I have 2 problems with this 1) I tested set minSDKVersion to API 21 and compilation times are not reduced 2) I don't know any mechanism to target different API levels according build configuration (on production I still need to target API 16)
do you know any workaround for this?
Answers
Hi @ClaudioRedi
I believe we already chatted about this on the public Xamarin Slack, but I would like to add items from that conversation here to help others in the future.
I have two blog posts that go over these concepts in depth:
http://www.jon-douglas.com/2016/09/05/xamarin-android-multidex/
http://www.jon-douglas.com/2016/09/23/xamarin-android-multidex-keep/
As for compilation time, we would need a diagnostic build output of your project to see where the majority of the time is spent in building.
Build Logs
Please send us your respective build logs: https://forums.xamarin.com/discussion/27515/how-to-obtain-diagnostic-build-logs (XS) and http://blogs.msdn.com/b/msbuild/archive/2005/09/29/475157.aspx (VS)