monodroid:无法使用评估版本部署到模拟器
我遵循了“如何使用 monodroid 和 vs2010 构建 hello word 应用程序”的所有描述。当我通过按 F5 部署解决方案并选择模拟器时,模拟器启动,我可以从设备列表中选择它,打包开始,但是收到错误消息:无法创建 Android 包,请参阅“输出(构建)”窗口了解更多详细信息。 在输出窗口中,我可以看到以下消息(完整的消息已添加到问题的末尾): ...monodroid:错误 1:评估版本需要针对共享运行时...
任何人都可以帮助完成工作吗?
感谢转发:Zsolt
Microsoft (R) Build Engine 版本 4.0.30319.1 [微软.NET框架,版本4.0.30319.225] 版权所有 (C) Microsoft Corporation 2007。保留所有权利。
2011年5月5日开始建设。 11:12:38。 节点 1 上的项目“c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\MonoAndroidApplication1.csproj”(SignAndroidPackage 目标)。 _GenerateAndroidAssetsDir: 跳过目标“_GenerateAndroidAssetsDir”,因为它没有输出。 _ResolveMonoAndroidSdks: 正在寻找Android SDK.. 未找到关键 HKCU\SOFTWARE\Android SDK Tools\Path。 找到关键 HKLM\SOFTWARE\Android SDK Tools\Path: 路径包含 \platform-tools (C:\Program Files\Android\android-sdk) 中的 adb.exe。 寻找Java SDK.. 发现关键 HKLM\SOFTWARE\JavaSoft\Java Development Kit\CurrentVersion:1.6。 HKLM\SOFTWARE\JavaSoft\Java Development Kit\1.6\JavaHome 发现密钥: 路径包含 \bin (C:\Program Files\Java\jdk1.6.0_25) 中的 jarsigner.exe。 MonoAndroid 工具:C:\Program Files\MSBuild\Novell\ MonoAndroid 框架:C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\;C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\ Android SDK:C:\Program Files\Android\android-sdk\ Java SDK:C:\Program Files\Java\jdk1.6.0_25\ _ValidateAndroidPackageProperties: 获取AndroidPackageName任务 清单文件: 程序集名称:MonoAndroidApplication1 包名称:MonoAndroidApplication1.MonoAndroidApplication1 _更新AndroidResgen: 跳过目标“_UpdateAndroidResgen”,因为所有输出文件相对于输入文件都是最新的。 生成TargetFrameworkMoniker属性: 跳过目标“GenerateTargetFrameworkMonikerAttribute”,因为所有输出文件相对于输入文件都是最新的。 核心编译: 跳过目标“CoreCompile”,因为所有输出文件相对于输入文件都是最新的。 将文件复制到输出目录: MonoAndroidApplication1 ->; c:\文档和设置\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\bin\Release\MonoAndroidApplication1.dll _编译Android包: Android任务 程序集:c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\bin\Release\MonoAndroidApplication1.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll I18n组件: BuildDirectory: c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\ ReferenceAssemblies目录:C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\;C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\;; AndroidSdk目录:C:\Program Files\Android\android-sdk\ JavaSdk目录:C:\Program Files\Java\jdk1.6.0_25\ AssetDirectory: c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\assets\ AndroidSdk平台:8 MonoAndroidTools目录:C:\Program Files\MSBuild\Novell\ 资源目录:c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\res\ 清单模板: 包:MonoAndroidApplication1.MonoAndroidApplication1 本机库: Java来源: 调试:错误 使用共享运行时:False 支持的Abis:armeabi 链接模式:仅 SDK 额外参数:
C:\Program Files\MSBuild\Novell\mandroid.exe -v --nosign --sdk-dir="C:\Program Files\Android\android-sdk" --builddir="c:\documents and settings\zsolt \dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\android" --framework-dir="C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2" --framework-dir ="C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0" -S="c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\ res" --package="MonoAndroidApplication1.MonoAndroidApplication1" --linksdkonly --noshared --abi="armeabi" --java-sdk-dir="C:\Program Files\Java\jdk1.6.0_25" --sdk-平台=“8”“c:\文档和设置\ zsolt \dokumentumok \ Visual Studio 2010 \ Projects \ MonoAndroidApplication1 \ MonoAndroidApplication1 \ bin \ Release \ MonoAndroidApplication1.dll”“C:\ Program Files \ Reference Assemblies \ Microsoft \ Framework \ MonoAndroid \v2.2\Mono.Android.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid \v1.0\System.Core.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid \v1.0\System.Xml.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll" monodroid:错误1:评估版本需要针对共享运行时。 [c:\文档和设置\ zsolt \dokumentumok \ Visual Studio 2010 \ Projects \ MonoAndroidApplication1 \ MonoAndroidApplication1 \ MonoAndroidApplication1.csproj] 完成构建项目“c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\MonoAndroidApplication1.csproj”(SignAndroidPackage 目标)——失败。
构建失败。
“c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\MonoAndroidApplication1.csproj”(SignAndroidPackage 目标)(1) -> (_CompileAndroidPackage目标)-> monodroid:错误1:评估版本需要针对共享运行时。 [c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\MonoAndroidApplication1.csproj]
0 Warning(s)
1 Error(s)
已用时间 00:00:02.46
错误:已取消 ========== 部署:0 成功,1 失败,0 跳过 ==========
I followed all the descriptions of "how to build a hello word app with monodroid and vs2010. When I deploy solution by pressing F5 and select the emulator, the emulator starts up, I can select it from the device list, the packaging starts, but gets an error said:Could not create the Android package. See the Output (Build) window for more details.
In the output window, I can see the following message (the complete message had been added to the end of the question):
...monodroid : error 1: Evaluation version requires targeting the shared runtime...
Anyone can help to gets work it?
Thanks forward: Zsolt
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.225]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
Build started 2011.05.05. 11:12:38.
Project "c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\MonoAndroidApplication1.csproj" on node 1 (SignAndroidPackage target(s)).
_GenerateAndroidAssetsDir:
Skipping target "_GenerateAndroidAssetsDir" because it has no outputs.
_ResolveMonoAndroidSdks:
Looking for Android SDK..
Key HKCU\SOFTWARE\Android SDK Tools\Path not found.
Key HKLM\SOFTWARE\Android SDK Tools\Path found:
Path contains adb.exe in \platform-tools (C:\Program Files\Android\android-sdk).
Looking for Java SDK..
Key HKLM\SOFTWARE\JavaSoft\Java Development Kit\CurrentVersion found: 1.6.
Key HKLM\SOFTWARE\JavaSoft\Java Development Kit\1.6\JavaHome found:
Path contains jarsigner.exe in \bin (C:\Program Files\Java\jdk1.6.0_25).
MonoAndroid Tools: C:\Program Files\MSBuild\Novell\
MonoAndroid Framework: C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\;C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\
Android SDK: C:\Program Files\Android\android-sdk\
Java SDK: C:\Program Files\Java\jdk1.6.0_25\
_ValidateAndroidPackageProperties:
GetAndroidPackageName Task
ManifestFile:
AssemblyName: MonoAndroidApplication1
PackageName: MonoAndroidApplication1.MonoAndroidApplication1
_UpdateAndroidResgen:
Skipping target "_UpdateAndroidResgen" because all output files are up-to-date with respect to the input files.
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
MonoAndroidApplication1 -> c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\bin\Release\MonoAndroidApplication1.dll
_CompileAndroidPackage:
Mandroid Task
Assemblies: c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\bin\Release\MonoAndroidApplication1.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll; C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll
I18nAssemblies:
BuildDirectory: c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\
ReferenceAssembliesDirectory: C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\;C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\;;
AndroidSdkDirectory: C:\Program Files\Android\android-sdk\
JavaSdkDirectory: C:\Program Files\Java\jdk1.6.0_25\
AssetDirectory: c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\assets\
AndroidSdkPlatform: 8
MonoAndroidToolsDirectory: C:\Program Files\MSBuild\Novell\
ResourceDirectory: c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\res\
ManifestTemplate:
Package: MonoAndroidApplication1.MonoAndroidApplication1
NativeLibrary:
JavaSource:
Debug: False
UseSharedRuntime: False
SupportedAbis: armeabi
LinkMode: SdkOnly
ExtraArgs:
C:\Program Files\MSBuild\Novell\mandroid.exe -v --nosign --sdk-dir="C:\Program Files\Android\android-sdk" --builddir="c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\android" --framework-dir="C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2" --framework-dir="C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0" -S="c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\obj\Release\res" --package="MonoAndroidApplication1.MonoAndroidApplication1" --linksdkonly --noshared --abi="armeabi" --java-sdk-dir="C:\Program Files\Java\jdk1.6.0_25" --sdk-platform="8" "c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\bin\Release\MonoAndroidApplication1.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll"
monodroid : error 1: Evaluation version requires targeting the shared runtime. [c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\MonoAndroidApplication1.csproj]
Done Building Project "c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\MonoAndroidApplication1.csproj" (SignAndroidPackage target(s)) -- FAILED.
Build FAILED.
"c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\MonoAndroidApplication1.csproj" (SignAndroidPackage target) (1) ->
(_CompileAndroidPackage target) ->
monodroid : error 1: Evaluation version requires targeting the shared runtime. [c:\documents and settings\zsolt\dokumentumok\visual studio 2010\Projects\MonoAndroidApplication1\MonoAndroidApplication1\MonoAndroidApplication1.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.46
Error: Cancelled
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为你的问题和我的一样。
我在项目位置(C:\Users\bálint...)中有一个特殊字符。
尝试创建一个新项目,并将位置设置为简单的内容,例如 C:\Work\,也许您可以避免此错误。
Your problem -I think- is the same as mine.
I had a special character in the projects Location (C:\Users\bálint...).
Try to create a new project, and set the Location something simple, like C:\Work\, and probably you can avoid this error.
我也有类似的问题。就我而言,问题在于包名称。我的包名称中有一个特殊字符。
I had too a similar issue. In my case the problem was the package name. I had a special character in the package name.
我也遇到了类似的问题,结果是虽然我购买了Xamarin Mono for Android软件,但我没有在Visual Studio 2010中注册它。我已经安装了它但没有注册它。
I had a similar issue and it turned out to be that although I had purchased the Xamarin Mono for Android software, I had not registered it in Visual Studio 2010. I had installed it but had not registered it.
我遇到了同样的情况,我找到了一个解决方案,我在这里粘贴解决方案,因为我不确定 链接 将可用
Windows
打开 Android SDK Manager,并确保您有“Android SDK
已安装“Build-tools”Rev. 19.1 或 20。如果没有,请安装它。
找到您的 Android SDK 文件夹。你可以在错误中找到这个
消息,或者您可以在 Visual Studio 中的“工具 -> 选项 -> ”下查看
Xamarin->安卓设置-> Android SDK 位置”。为此
例如,我将使用:
%LOCALAPPDATA%\Android\android-sdk
%LOCALAPPDATA%\Android\android-sdk\build-tools\19.1.0\zipalign 进入
工具文件夹:
%LOCALAPPDATA%\Android\android-sdk\tools\zipalign
打开 Android SDK Manager,并确保您已安装“Android SDK Build-tools”Rev. 19.1 或 20。如果没有,请安装它。
找到您的 Android SDK 文件夹。你可以在错误中找到这个
消息,或者您可以在 Xamarin Studio 中的“Xamarin Studio ->”下查看
首选项->项目-> SDK 位置 ->安卓-> Android SDK”。
对于此示例,我将使用:
~/Library/Developer/Xamarin/android-sdk-macosx 从复制 zipalign
构建工具文件夹:
~/Library/Developer/Xamarin/android-sdk-macosx/build-tools/19.1.0/zipalign
进入工具文件夹:
~/Library/Developer/Xamarin/android-sdk-macosx/tools/zipalign
i ran into same situation and i found a solution i am pasting solution here as i am not sure how long the Link will be available
Windows
Open Android SDK Manager, and ensure that you have "Android SDK
Build-tools" Rev. 19.1 or 20 installed. If not, install it.
Locate your Android SDK folder. You can find this in the error
message, or you can look in Visual Studio under "Tools -> Options ->
Xamarin -> Android Settings -> Android SDK Location". For this
example, I'll use:
%LOCALAPPDATA%\Android\android-sdk
%LOCALAPPDATA%\Android\android-sdk\build-tools\19.1.0\zipalign Into
the tools folder:
%LOCALAPPDATA%\Android\android-sdk\tools\zipalign
Open Android SDK Manager, and ensure that you have "Android SDK Build-tools" Rev. 19.1 or 20 installed. If not, install it.
Locate your Android SDK folder. You can find this in the error
message, or you can look in Xamarin Studio under "Xamarin Studio ->
Preferences -> Projects -> SDK Locations -> Android -> Android SDK".
For this example, I'll use:
~/Library/Developer/Xamarin/android-sdk-macosx Copy zipalign from the
build-tools folder:
~/Library/Developer/Xamarin/android-sdk-macosx/build-tools/19.1.0/zipalign
Into the tools folder:
~/Library/Developer/Xamarin/android-sdk-macosx/tools/zipalign