0

Xamarin and CocosSharp are used in Visual Studio 2015.

When using 340m as heap space:

Error java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing 'java.exe -Xmx340m -jar C:\Users\abb\AppData\Local\Android\android-sdk\build-tools\23.0.1\lib\dx.jar --no-strict --dex --output=obj\Debug\android\bin obj\Debug\android\bin\classes "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v5.0\mono.android.jar" obj\Debug__library_projects__\Xamarin.Android.Support.Compat\library_project_imports\classes.jar obj\Debug__library_projects__\Xamarin.Android.Support.Core.UI\library_project_imports\classes.jar obj\Debug__library_projects__\Xamarin.Android.Support.Core.Utils\library_project_imports\classes.jar obj\Debug__library_projects__\Xamarin.Android.Support.Fragment\library_project_imports\classes.jar obj\Debug__library_projects__\Xamarin.Android.Support.Media.Compat\library_project_imports\classes.jar obj\Debug__library_projects__\Xamarin.Android.Support.v4\library_project_imports\classes.jar obj\Debug__library_projects__\Xamarin.GooglePlayServices.Ads\library_project_imports\classes.jar obj\Debug__library_projects__\Xamarin.GooglePlayServices.Ads.Lite\library_project_imports\classes.jar C:\Users\abb\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\25.0.0\embedded\classes.jar C:\Users\abb\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Drive\25.0.0\embedded\classes.jar C:\Users\abb\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Games\25.0.0\embedded\classes.jar' App.Android

But when using 350m as heap space, a rather cryptic error message occurs.

Error java.lang.IllegalArgumentException: already added : Lcom/google/android/gms/internal/zzkf$5; App.Android

What must be done to resolve that issue??

IDE info:

Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework Version 4.6.01055

Installed Version: Community

Visual Basic 2015 00322-20000-00000-AA079 Microsoft Visual Basic 2015

Visual C# 2015 00322-20000-00000-AA079 Microsoft Visual C# 2015

Visual C++ 2015 00322-20000-00000-AA079 Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package 7.18.00214.2 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11107.0 ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0 For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.40314.0 For additional information, visit http://www.asp.net/

Command Bus, Event Stream and Async Manager Merq Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools 1.8 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitExtensions 1.0 Git Extensions is a graphical user interface for Git that allows you to control Git without using the command-line

GitPlugin Extension 1.0 GitPlugin Visual Studio Extension Detailed Info

JavaScript Language Service 2.0 JavaScript Language Service

JavaScript Project System 2.0 JavaScript Project System

Microsoft Azure Mobile Services Tools 1.4 Microsoft Azure Mobile Services Tools

NuGet Package Manager 3.4.4 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer 1.2 Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 14.0.60519.0 Microsoft SQL Server Data Tools

TypeScript 1.8.36.0 TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps 14.0.25527.01 The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin 4.2.1.64 (872717c) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android 7.0.2.37 (ce955cc) Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS 10.2.1.5 (44931ae) Visual Studio extension to enable development for Xamarin.iOS.

mnemonic
  • 1,605
  • 2
  • 17
  • 26

1 Answers1

0

Firstly I played with the NuGet manager and secondly the project file was reviewed.

Thru playing around the build error was modified towards another code instead of zzkf$5.

Within the project, references are existing towards GooglePlayServices.{Ads,Base,Drive,Games}.

In my packages.config, many references were existing.

Thus only {Ads,Base,Drive,Games} were kept.

But redundancies were also existing in the packages.config file. e.g. Base 24a with relation to target platform 5.0 and also Base 25.0.0.0 with relation to target platform 5.1.

Subsequently to removing the Base 24a entries, the csproj file was reviewed. Within that file, the entries were still linking towards the 24a library. This was modified towards 25.0.0.0 and the packages folder was manually cleaned up. So build succeeded. Hope that helps to avoid some headache.

mnemonic
  • 1,605
  • 2
  • 17
  • 26