Reputation: 11
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 ==========
Upvotes: 1
Views: 5214
Reputation: 99
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
Mac
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
Upvotes: 0
Reputation: 11
I had too a similar issue. In my case the problem was the package name. I had a special character in the package name.
Upvotes: 1
Reputation: 1
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.
Upvotes: 0
Reputation: 41
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.
Upvotes: 2