【Xamarin報錯】 COMPILETODALVIK : UNEXPECTED TOP-LEVEL error java.lang.OutOfMemoryError: Java heap space

Xamarin Android 編譯報錯:java

COMPILETODALVIK : UNEXPECTED TOP-LEVEL error  android

java.lang.OutOfMemoryError: Java heap spacepost

解決:visual-studio

用記事本打開 xamarin android的項目文件 *.csprojui

找到<JavaMaximumHeapSize>節點,個人配置是空的,加上1G後,編譯經過。this

 

參考:spa

The fix was to add this section in your .csproj file:.net

<PropertyGroup> 
    <JavaMaximumHeapSize>1G</JavaMaximumHeapSize> 
</PropertyGroup>
blog

That will let Java allocate enough memory to complete your build.it

That’s it! I hope someone find this post useful!

http://geekswithblogs.net/dotNETvinz/archive/2015/02/17/xamarin.android-and-visual-studiondashbuild-failed-with-no-errors.aspx

相關文章
相關標籤/搜索