简体   繁体   English

如何为Mono Android创建.snk文件

[英]How to create .snk file for Mono android

I have done android project in the mono develop It working fine in debug mode but when I am Trying to run project in release mode then it is giving following error: 我已经在mono开发中完成了android项目,它在调试模式下工作正常,但是当我尝试在发布模式下运行项目时,出现以下错误:

C:\Users\Administrator.EDZ0138\Documents\Projects\IdooctopusNew\IdooctopusNew\SGEN: Error: 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) (IdooctopusNew)

Can anyone please help me ? 谁能帮帮我吗 ?

I got a solution for this issue. 我已经解决了这个问题。

You just have to do is, put the mono.android.dll in to the C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0A\\bin folder, open a command prompt and do following steps: 您只需要做的是,将mono.android.dll放入C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0A\\bin文件夹,打开命令提示符并执行以下步骤:

  1. cd C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0A\\bin

  2. sn -Vr Mono.Android.dll

  3. gacutil -i C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0A\\bin

Then build the project. 然后构建项目。

If you get the error for another DLL like System.xml.dll etc. then repeat above procedure for respective DLL. 如果您收到另一个DLL的错误,例如System.xml.dll等,请对相应的DLL重复上述过程。

All the best.......! 祝一切顺利.......!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM