Bug 1929 - Error "Failure [INSTALL_FAILED_OLDER_SDK]" occurs in deploying the application on Emulator.
Summary: Error "Failure [INSTALL_FAILED_OLDER_SDK]" occurs in deploying the applicatio...
Status: CLOSED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 1.9.2
Hardware: PC Windows
: --- major
Target Milestone: ---
Assignee: Bugzilla
URL:
: 1931 1934 1944 1951 1952 2002 2009 2010 ()
Depends on:
Blocks:
 
Reported: 2011-11-08 05:55 UTC by narayanp
Modified: 2011-12-22 08:06 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Screen Shot (295.85 KB, image/png)
2011-11-08 05:55 UTC, narayanp
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
CLOSED INVALID

Description narayanp 2011-11-08 05:55:39 UTC
Created attachment 839 [details]
Screen Shot

Step to Reproduce:

1. Launch MonoDevelop.
2. Click on "Open the existing Solution" link.
3. Browse the Textured Cube application.
4. Build the application and select "Debug" option under Active Configuration.
5. Click on Run from the top menu bar and select API 7 from select device window.

Actual Result:
"Failure [INSTALL_FAILED_OLDER_SDK]" message display in Deploy to Device tab and 
D/AndroidRuntime(  249): Shutting down VM

E/AndroidRuntime(  249): Uncaught handler: thread main exiting due to uncaught exception

E/AndroidRuntime(  249): java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.DebugRuntime or Mono.Android.Platform.ApiLevel_8!

E/AndroidRuntime(  249): 	at android.app.ActivityThread.installProvider(ActivityThread.java:4270)

E/AndroidRuntime(  249): 	at android.app.ActivityThread.installContentProviders(ActivityThread.java:4042)

E/AndroidRuntime(  249): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4001)

E/AndroidRuntime(  249): 	at android.app.ActivityThread.access$2900(ActivityThread.java:119)

E/AndroidRuntime(  249): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1901)

E/AndroidRuntime(  249): 	at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime(  249): 	at android.os.Looper.loop(Looper.java:123)

E/AndroidRuntime(  249): 	at android.app.ActivityThread.main(ActivityThread.java:4363)

E/AndroidRuntime(  249): 	at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime(  249): 	at java.lang.reflect.Method.invoke(Method.java:521)

E/AndroidRuntime(  249): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)

E/AndroidRuntime(  249): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

E/AndroidRuntime(  249): 	at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime(  249): Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.DebugRuntime or Mono.Android.Platform.ApiLevel_8!

E/AndroidRuntime(  249): 	at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:30)

E/AndroidRuntime(  249): 	at android.app.ActivityThread.installProvider(ActivityThread.java:4267)

E/AndroidRuntime(  249): 	... 12 more

E/AndroidRuntime(  249): Caused by: android.content.pm.PackageManager$NameNotFoundException: Mono.Android.Platform.ApiLevel_8

E/AndroidRuntime(  249): 	at android.app.ApplicationContext$ApplicationPackageManager.getApplicationInfo(ApplicationContext.java:1604)

E/AndroidRuntime(  249): 	at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:22)

E/AndroidRuntime(  249): 	... 13 more

I/Process (  249): Sending signal. PID: 249 SIG: 9

message display in Application Output tab.

Expected Result:
Error should not occur in running the application and application should deploy on the emulator successfully.

Environment:
MonoForAndroid 1.9.3
MonoDevelop 2.8.2
Comment 1 Jonathan Pryor 2011-11-08 16:11:30 UTC
The default API level if not otherwise specified is API level 8. Since TextureCube.csproj contains no <TargetFrameworkVersion/> element, it will use the default value of 8, while you're attempting to install on API level 7, hence:

    Failure [INSTALL_FAILED_OLDER_SDK]

Given this environment, arguably the correct behavior is that MonoDevelop would _not_ install the application, and would display an error message saying why.

In no way is it possible for the app to be installed AND run.

If you want to run the app (which you do), you need to specify the target framework:

 1. In the Solution Pad, right-click the TextureCube project, then click Options.
 2. In the Project Options window, select Build / General in the tree.
 3. Set the Target Framework dropdown to Mono for Android 2.1.
 4. Clean, rebuild, reinstall the application.

You will need to improve the test cases to explicitly set the Target Framework version for the target device.
Comment 3 Jonathan Pryor 2011-11-09 16:28:04 UTC
*** Bug 1934 has been marked as a duplicate of this bug. ***
Comment 4 Jonathan Pryor 2011-11-09 20:21:57 UTC
*** Bug 1944 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Pryor 2011-11-09 20:25:54 UTC
*** Bug 1951 has been marked as a duplicate of this bug. ***
Comment 6 Jonathan Pryor 2011-11-09 20:26:12 UTC
*** Bug 1952 has been marked as a duplicate of this bug. ***
Comment 7 narayanp 2011-11-10 11:45:22 UTC
On MAC system:

API 14:
Fail: Failure [INSTALL_FAILED_OLDER_SDK] (Debug Mode)

API 7:
Fail: Failure [INSTALL_FAILED_OLDER_SDK] (Debug Mode)
Comment 8 Jonathan Pryor 2011-11-11 15:38:52 UTC
*** Bug 2002 has been marked as a duplicate of this bug. ***
Comment 9 Jonathan Pryor 2011-11-11 15:42:00 UTC
*** Bug 2009 has been marked as a duplicate of this bug. ***
Comment 10 Jonathan Pryor 2011-11-11 15:43:13 UTC
*** Bug 2010 has been marked as a duplicate of this bug. ***
Comment 11 Atin 2011-11-14 08:00:11 UTC
We RUN this application on MAC in API 10,14 and got below errors:


I/monodroid-gc(  369): environment supports jni NewWeakGlobalRef
I/MonoDroid(  369): UNHANDLED EXCEPTION: System.InvalidCastException: Value is not a convertible object: Mono.Samples.TexturedCube.TexturedCubeActivity to Android.Content.Context
I/MonoDroid(  369): at System.Convert.ToType (object,System.Type,System.IFormatProvider,bool) <0x008e8>
I/MonoDroid(  369): at System.Convert.ChangeType (object,System.Type) <0x00083>
I/MonoDroid(  369): at Android.Runtime.JNIEnv.GetObjectArray (intptr,System.Type[]) <0x0015f>
I/MonoDroid(  369): at Android.Runtime.TypeManager.n_Activate (intptr,intptr,intptr,intptr,intptr,intptr) <0x00077>
I/MonoDroid(  369): at (wrapper native-to-managed) Android.Runtime.TypeManager.n_Activate (intptr,intptr,intptr,intptr,intptr,intptr) <0x0007b>
I/MonoDroid(  369): at (wrapper delegate-invoke) <Module>.invoke_void__this___intptr_intptr_intptr_intptr_JValue[] (intptr,intptr,intptr,intptr,Android.Runtime.JValue[]) <0x000d3>
I/MonoDroid(  369): at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) <0x00067>
I/MonoDroid(  369): at Android.App.Activity.SetContentView (int) <0x0020b>
I/MonoDroid(  369): at Mono.Samples.TexturedCube.TexturedCubeActivity.OnCreate (Android.OS.Bundle) <0x0006b>
I/MonoDroid(  369): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x0005b>
I/MonoDroid(  369): at (wrapper dynamic-method) object.b823f6aa-def4-459e-8b23-520be94eca22 (intptr,intptr,intptr) <0x00033>
E/mono    (  369): 
E/mono    (  369): Unhandled Exception: System.InvalidCastException: Value is not a convertible object: Mono.Samples.TexturedCube.TexturedCubeActivity to Android.Content.Context
E/mono    (  369):   at System.Convert.ToType (System.Object value, System.Type conversionType, IFormatProvider provider, Boolean try_target_to_type) [0x00000] in <filename unknown>:0 
E/mono    (  369):   at System.Convert.ChangeType (System.Object value, System.Type conversionType) [0x00000] in <filename unknown>:0 
E/mono    (  369):   at Android.Runtime.JNIEnv.GetObjectArray (IntPtr array_ptr, System.Type[] element_types) [0x00000] in <filename unknown>:0 
E/mono    (  369):   at Android.Runtime.TypeManager.n_Activate (IntPtr jnienv, IntPtr jclass, IntPtr typename_ptr, IntPtr signature_ptr, IntPtr jobject, IntPtr parameters_ptr) [0x00000] in <filename unknown>:0 
E/mono    (  369):   at (wrapper native-to-managed) Android.Runtime.TypeManager:n_Activate (intptr,intptr,intptr,intptr,intptr,intptr)
E/mono    (  369):   at (wrapper delegate-invoke) <Module>:invoke_void__this___intptr_intptr_intptr_intptr_JValue[] (intptr,intptr,intptr,intptr,Android.Runtime.JValu


Environments:

M4A: 1.9.3
MD 3.0 Beta-1(2.9)
MAC 10.7
Comment 12 narayanp 2011-11-14 08:52:01 UTC
Environment:

Windows7
MonoDevelop 3.0 Beta 1
MonoForAndroid 1.9.3

API 10/API 14/API 7: Internal error. Could not find file 'C:\Users\win7\Desktop\xamarin-monodroid-samples-d071bf8\xamarin-monodroid-samples-d071bf8\TexturedCube\bin\Release\mono.samples.texturedcube-Signed.apk'.(Debug/Release)
Comment 13 Jonathan Pryor 2011-11-17 17:11:57 UTC
*** Bug 1931 has been marked as a duplicate of this bug. ***
Comment 14 narayanp 2011-12-22 08:05:52 UTC
Now this issue has been fixed, however new issue occurs when we run the app on API7.
Bug 2209 - Many samples layouts are not compatible with API Level 7
Hence closing this issue.