java.lang.OutOfMemoryError。考虑增加$(JavaMaximumHeapSize)的值

时间:2019-05-31 10:54:27

标签: xamarin memory-management xamarin.forms garbage-collection heap

我正在处理Android项目中的Xamarin.Forms,但出现错误。

  

java.lang.OutOfMemoryError。考虑增加价值   $(JavaMaximumHeapSize)。 Java执行时内存不足   'java.exe -Xmx4G -jar   C:\ android-sdk \ android-sdk \ build-tools \ 27.0.3 \ lib \ dx.jar --dex   --no-strict --multi-dex --main-dex-list = obj \ Debug \ 90 \ multidex.keep --output obj \ Debug \ 90 \ android \ bin D:\ Arvind.ch \ SIS \ SIS_Product \ SIS全局开发\ edTheSISApp \ edTheSIS \ edTheSIS \ edTheSIS.Android \ obj \ Debug \ 90 \ android \ bin \ classes.zip   “ C:\ Program Files(x86)\ Microsoft Visual   Studio \ 2017 \ Enterprise \ Common7 \ IDE \ ReferenceAssemblies \ Microsoft \ Framework \ MonoAndroid \ v9.0 \ mono.android.jar“   “ C:\ Program Files(x86)\ Microsoft Visual   Studio \ 2017 \ Enterprise \ MSBuild \ Xamarin \ Android \ android-support-multidex.jar“   obj \ Debug \ 90 \ lp \ 28 \ jl \ android.arch.core.common.jar   obj \ Debug \ 90 \ lp \ 29 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 30 \ jl \ android.arch.lifecycle.common.jar   obj \ Debug \ 90 \ lp \ 31 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 32 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 33 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 34 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 35 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 36 \ jl \ com.android.support.support-annotations.jar   obj \ Debug \ 90 \ lp \ 37 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 38 \ jl \ com.android.support.collections.jar   obj \ Debug \ 90 \ lp \ 39 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 40 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 41 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 42 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 43 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 44 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 45 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 46 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 47 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 48 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 49 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 5 \ jl \ formsviewgroup.jar   obj \ Debug \ 90 \ lp \ 50 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 51 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 52 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 53 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 54 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 55 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 56 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 57 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 58 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 59 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 60 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 61 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 62 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 63 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 64 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 65 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 66 \ jl \ bin \ classes.jar   obj \ Debug \ 90 \ lp \ 68 \ jl \ classes.jar obj \ Debug \ 90 \ lp \ 69 \ jl \ classes.jar   obj \ Debug \ 90 \ lp \ 70 \ jl \ classes.jar obj \ Debug \ 90 \ lp \ 75 \ jl \ classes.jar   obj \ Debug \ 90 \ lp \ 76 \ jl \ classes.jar'SIS.Android

这是内置输出

 No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
1>  Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
1>  Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
1>  Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
1>  Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
1>  Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
1>  5 errors; aborting
1>  Picked up _JAVA_OPTIONS: -Xmx512M
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2610,3): error XA5213: java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing 'java.exe -Xmx4G -jar C:\android-sdk\android-sdk\build-tools\27.0.3\\lib\dx.jar --dex --no-strict --multi-dex --main-dex-list=obj\Debug\90\multidex.keep --output obj\Debug\90\android\bin D:\Arvind.ch\SIS\SIS_Product\SIS-Global-Dev\edTheSISApp\edTheSIS\edTheSIS\edTheSIS.Android\obj\Debug\90\android\bin\classes.zip "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v9.0\mono.android.jar" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\android-support-multidex.jar" obj\Debug\90\lp\28\jl\android.arch.core.common.jar obj\Debug\90\lp\29\jl\bin\classes.jar obj\Debug\90\lp\30\jl\android.arch.lifecycle.common.jar obj\Debug\90\lp\31\jl\bin\classes.jar obj\Debug\90\lp\32\jl\bin\classes.jar obj\Debug\90\lp\33\jl\bin\classes.jar obj\Debug\90\lp\34\jl\bin\classes.jar obj\Debug\90\lp\35\jl\bin\classes.jar obj\Debug\90\lp\36\jl\com.android.support.support-annotations.jar obj\Debug\90\lp\37\jl\bin\classes.jar obj\Debug\90\lp\38\jl\com.android.support.collections.jar obj\Debug\90\lp\39\jl\bin\classes.jar obj\Debug\90\lp\40\jl\bin\classes.jar obj\Debug\90\lp\41\jl\bin\classes.jar obj\Debug\90\lp\42\jl\bin\classes.jar obj\Debug\90\lp\43\jl\bin\classes.jar obj\Debug\90\lp\44\jl\bin\classes.jar obj\Debug\90\lp\45\jl\bin\classes.jar obj\Debug\90\lp\46\jl\bin\classes.jar obj\Debug\90\lp\47\jl\bin\classes.jar obj\Debug\90\lp\48\jl\bin\classes.jar obj\Debug\90\lp\49\jl\bin\classes.jar obj\Debug\90\lp\5\jl\formsviewgroup.jar obj\Debug\90\lp\50\jl\bin\classes.jar obj\Debug\90\lp\51\jl\bin\classes.jar obj\Debug\90\lp\52\jl\bin\classes.jar obj\Debug\90\lp\53\jl\bin\classes.jar obj\Debug\90\lp\54\jl\bin\classes.jar obj\Debug\90\lp\55\jl\bin\classes.jar obj\Debug\90\lp\56\jl\bin\classes.jar obj\Debug\90\lp\57\jl\bin\classes.jar obj\Debug\90\lp\58\jl\bin\classes.jar obj\Debug\90\lp\59\jl\bin\classes.jar obj\Debug\90\lp\60\jl\bin\classes.jar obj\Debug\90\lp\61\jl\bin\classes.jar obj\Debug\90\lp\62\jl\bin\classes.jar obj\Debug\90\lp\63\jl\bin\classes.jar obj\Debug\90\lp\64\jl\bin\classes.jar obj\Debug\90\lp\65\jl\bin\classes.jar obj\Debug\90\lp\66\jl\bin\classes.jar obj\Debug\90\lp\68\jl\classes.jar obj\Debug\90\lp\69\jl\classes.jar obj\Debug\90\lp\70\jl\classes.jar obj\Debug\90\lp\75\jl\classes.jar obj\Debug\90\lp\76\jl\classes.jar'
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

0 个答案:

没有答案