xamarin.forms java.exe在vs 2017中以代码2退出

时间:2019-02-13 14:02:30

标签: xamarin xamarin.forms

我在xamarin.forms项目中遇到此错误,这真令人讨厌,因为我已经尝试了以下所有解决方案,但没有一个能解决!

  • 已启用Multi-Dex
  • 将最大堆大小设置为1G(甚至5G)
  • 禁用符号.apk
  • 更新了所有nuget程序包(xamarin.android.support程序包实际上是首先导致此错误的原因!)
  • 我还更新了JDK !! 除了以上所有以外,还有其他人有解决方案吗?

编辑

这是完整的错误:

10>"C:\Users\Home\Desktop\Vebko\Vebko\Vebko.Android\Vebko.Android.csproj" (Rebuild;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) ->
10>(_CompileToDalvikWithDx target) -> 
10>  CREATEMULTIDEXMAINDEXCLASSLIST : warning : can't write resource [META-INF/LICENSE.txt] (Duplicate zip entry [commons-lang3-3.5.jar:META-INF/LICENSE.txt])
10>  CREATEMULTIDEXMAINDEXCLASSLIST : warning : can't write resource [META-INF/NOTICE.txt] (Duplicate zip entry [commons-lang3-3.5.jar:META-INF/NOTICE.txt])
10>
10>
10>"C:\Users\Home\Desktop\Vebko\Vebko\Vebko.Android\Vebko.Android.csproj" (Rebuild;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) ->
10>(_CompileToDalvikWithDx target) -> 
10>  C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2610,3): error MSB6006: "java.exe" exited with code 2.
10>
10>    260 Warning(s)
10>    1 Error(s)
10>
10>Time Elapsed 00:01:23.09
========== Rebuild All: 9 succeeded, 1 failed, 1 skipped ==========

0 个答案:

没有答案