Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 56820 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
We should give a better error. when users encounter: Xamarin.Android.Common.targets(3,3): Error MSB6006: “java” exited with code 2.
typically caused by going over the dalvik method limit. Point them to a doc telling them to reduce dependencies or enable mutlidex
I believe this issue can be solved by resolving the following bug first:
Going back to external programs giving an exit code of 0-255, we should be returning an error to MSBuild's Error List that contains actionable steps for the user. Typically to find these actionable steps, the user has to enable diagnostic build output. Here's an example of dx.jar failing similar to what Clancey is reporting:
Thus the error message:
1> trouble writing output: Too many field references: 67288; max is 65536. (TaskId:260)
1> You may try using --multi-dex option. (TaskId:260)
Should be returned to the user to inform them on an actionable step. We could potentially reword this message to say "Enable Multidex in your Android Options" which they actually have control over.