我正在开发 xamarin android 应用程序,并在其中使用了许多包和引用(Google play 服务)。当我尝试构建此项目时出现此错误:
java.exe exited with code 2 Trouble writing output: Too many field references: 81626; max is 65536. You may try using --multi-dex option
.
最佳答案
您需要启用 Mutlidex
在你的项目中。
Xamarin.Android 自 version 5.1 起支持此功能:
Multi-dex support can be enabled by using the new
$(AndroidEnableMultiDex)
MSBuild property, which is also available via Visual Studio and Xamarin Studio.
关于android - java.exe 已退出,代码为 2 (MSB6006) 无法写入输出 : Too many field references: 81626; max is 65536,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33142237/