2

I have been using monodroid in debug mode, but now my app is finished testing and I would like to release it to a device and then to google play store, I get the following error

`Error  1   Could not load file or assembly 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=c4c4237547e4b6cd' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)   C:\...\SGEN com.Project`

I found this while googling the error Xamarin Bug but I don't really understand how to make it so my app can work. Can someone please help me?

Edit: Apparently the Error is cause by using web references, the reported bug suggests to move the web references to a separate library that don't refer itself to mono references, any idea of how can I accomplish this?

Max Rasguido
  • 457
  • 6
  • 27
  • This happens all the time to me in Eclipse when using Android Project Libraries. Granted in those cases its error 1 dalkvim jibberish that doesn't mean anything. Usually I can go change the library flags in eclipse to off, clean all the projects, then set the flags back to on and try exporting a signed release build again. Same issue as you though, works fine in debug and then blows up on release. Hopefully this helps. – ian.shaun.thomas Aug 29 '12 at 21:25
  • Tried cleaning the project, but it still fails at release. Anyway it wasn't even allowing debug on a device and now it is debbuging, but still can't release – Max Rasguido Aug 29 '12 at 23:43
  • It is a pain but you could try copying all of the code into a new project. – ian.shaun.thomas Aug 30 '12 at 11:06
  • I really dont want to copy al the code, it's a pretty big project and it would take a lot of time – Max Rasguido Aug 30 '12 at 13:02
  • Already copied the code to a new project, anyway still not releasing, apparently it has something to do with the web reference I am using, any idea of what can I do? – Max Rasguido Aug 31 '12 at 11:23

1 Answers1

1

I was able to solve this problem doing the following:

  • Added a new project to my solution
  • Added my web reference to this new project
  • Deleted my web reference from my original project
  • Added a reference to the new project on the original project
  • Used new project web reference namespace to refer to my web reference

On this way, putting the web reference in a project that doesn't reference Mono.Android itself the application was able to release with no problems

Max Rasguido
  • 457
  • 6
  • 27