This project is read-only.

Android tests errors for github l commit d797f79f1d

Topics: Android, Source Repository
Oct 25, 2014 at 5:11 PM
when i try to run the android test from this version i get the following output

2>The "BuildApk" task failed unexpectedly.
2>System.ArgumentException: An item with the same key has already been added.
2> at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
2> at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
2> at Ionic.Zip.ZipFile._InternalAddEntry(ZipEntry ze)
2> at Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive)
2> at Xamarin.Android.Tasks.BuildApk.ExecuteWithAbi(String supportedAbis, String apkInputPath, String apkOutputPath)
2> at Xamarin.Android.Tasks.BuildApk.Execute()
2> at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2> at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
2>Build FAILED.

Any suggestions on what i need to fix this ?
Oct 27, 2014 at 4:51 PM
You fix this by removing the project from the android solution and then comment out the Guide references in the CCTextInput class.

This is a problem with Protobuild and how MonoGame generates its projects. Xamarin doesn't like having two projects in the same directory. I even tried targeting the Framework.Net library to a new directory and that didn't change the error.

We will probably have to write our own variation of Protobuild to fix the problem.
Oct 28, 2014 at 11:43 PM
I just pushed the fix to our MonoGame fork and tested out an actual Android game. I was able to publish the APK without any coercion in the projects. This problem should be gone now.

The problem was the MonoGame.Framework.Net assembly had the same GUID as the MonoGame.Framework assembly. This resulted in a packaging collision during the Android packager step. The fix was to change the protobuild definitions to create a new project location with links to the MonoGame.Framework source code.

You might encounter some reference breaks in your projects, maybe not. Just make sure you clean your project and then rebuild it.
Oct 29, 2014 at 9:20 AM
this fixed the issue. Thanks