I have an .apk application for android which has been compiled and packed with “Mono for Android” , When i copy it on my SD and install it works fine but when i execute it it gives me an error
app_vercode:1
device_model:ace
build_version:1.12.23
condition:1
processName:MonoAndroidApplication1.MonoAndroidApplication1
pid:24897
uid:10070
tag:null
shortMsg:android.content.pm.PackageManager$NameNotFoundException
longMsg:android.content.pm.PackageManager$NameNotFoundException: Mono.Android.DebugRuntime
stackTrace:java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.DebugRuntime or Mono.Android.Platform.ApiLevel_10!
at android.app.ActivityThread.installProvider(ActivityThread.java:3577)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:3329)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3285)
at android.app.ActivityThread.access$2200(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:969)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3703)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.DebugRuntime or Mono.Android.Platform.ApiLevel_10!
at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:30)
at android.app.ActivityThread.installProvider(ActivityThread.java:3574)
... 12 more
do i have to install anything before executing apk file packed with mono ?
In order to facilitate a fast change and deploy cycle, your .apk by default does not contain everything needed to run on device. The IDE will take care of installing everything needed for you application to run.
If you do not want to use an IDE, the easiest thing is to compile your app in Release mode, which is fully self contained.
Package details:
http://docs.xamarin.com/android/tutorials/Application_Package_Sizes