Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

App crash when building to x86 emulater

kenneth.leekenneth.lee USMember ✭✭✭

Hi guys,

So i'm finally done with my old ARM Android emulator and wanted to try x86.
After getting all the stuff required i can boot up my x86 Android emulator and i was great. A lot more responsive and fast compared to the ARM one.
But when I tried to build my app on to the x86 to debug, it'll load up the splash screen and crash. Same happens when i manually click on the icon within the device but I don't get to see the splash screen. I get no errors in error list and nothing in output other than "Android application is debugging."

I have looked at Configuration Manager and i have it set to Any CPU and I can't seem to add x86 to my Xamarin.Form and Xamarin.Android project.

I'm not sure if im doing wrong. If anyone knows or can help, any points to the right direction would be a great help.

Posts

  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    Can you check your adb logcat and see if there's an ERROR log level message inside with your error?

  • kenneth.leekenneth.lee USMember ✭✭✭

    LAUNCHER] flg=0x10000000 cmp=com.MobileApp.Android/md52756a63cade81005e12b999f52fa0153.SplashScreen} from uid 0 on display 0
    03-28 09:44:59.148 2504 2504 D AndroidRuntime: Shutting down VM
    03-28 09:47:23.743 2528 2528 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    03-28 09:47:23.744 2528 2528 D AndroidRuntime: CheckJNI is ON
    03-28 09:47:23.756 2528 2528 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
    03-28 09:47:23.772 2528 2528 E memtrack: Couldn't load memtrack module (No such file or directory)
    03-28 09:47:23.772 2528 2528 E android.os.Debug: failed to load memtrack module: -2
    03-28 09:47:23.773 2528 2528 I Radio-JNI: register_android_hardware_Radio DONE
    03-28 09:47:23.777 2528 2528 D AndroidRuntime: Calling main entry com.android.commands.am.Am
    03-28 09:47:23.781 2528 2528 D AndroidRuntime: Shutting down VM
    03-28 09:47:25.884 2541 2541 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    03-28 09:47:25.885 2541 2541 D AndroidRuntime: CheckJNI is ON
    03-28 09:47:26.456 2541 2541 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
    03-28 09:47:26.490 2541 2541 E memtrack: Couldn't load memtrack module (No such file or directory)
    03-28 09:47:26.490 2541 2541 E android.os.Debug: failed to load memtrack module: -2
    03-28 09:47:26.491 2541 2541 I Radio-JNI: register_android_hardware_Radio DONE
    03-28 09:47:26.500 2541 2541 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
    03-28 09:47:26.509 2313 2324 D DefContainer: Copying /data/local/tmp/com.MobileApp.Android-Signed.apk to base.apk
    03-28 09:47:26.605 1524 1548 W NativeHelper: Failure copying native libraries [errorCode=-113]
    03-28 09:47:26.605 1524 1548 I art : Starting a blocking GC Explicit
    03-28 09:47:26.613 1524 1548 I art : Explicit concurrent mark sweep GC freed 1876(143KB) AllocSpace objects, 0(0B) LOS objects, 33% free, 5MB/7MB, paused 332us total 7.005ms
    03-28 09:47:26.614 2541 2541 I art : System.exit called, status: 1
    03-28 09:47:26.614 2541 2541 I AndroidRuntime: VM exiting with result code 1.
    03-28 09:47:27.278 2567 2567 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    03-28 09:47:27.279 2567 2567 D AndroidRuntime: CheckJNI is ON
    03-28 09:47:27.784 2567 2567 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
    03-28 09:47:27.801 2567 2567 E memtrack: Couldn't load memtrack module (No such file or directory)
    03-28 09:47:27.801 2567 2567 E android.os.Debug: failed to load memtrack module: -2
    03-28 09:47:27.802 2567 2567 I Radio-JNI: register_android_hardware_Radio DONE
    03-28 09:47:27.807 2567 2567 D AndroidRuntime: Calling main entry com.android.commands.am.Am
    03-28 09:47:27.811 2567 2567 D AndroidRuntime: Shutting down VM
    03-28 09:47:28.177 2579 2579 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    03-28 09:47:28.179 2579 2579 D AndroidRuntime: CheckJNI is ON
    03-28 09:47:28.196 2579 2579 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
    03-28 09:47:28.211 2579 2579 E memtrack: Couldn't load memtrack module (No such file or directory)
    03-28 09:47:28.211 2579 2579 E android.os.Debug: failed to load memtrack module: -2
    03-28 09:47:28.212 2579 2579 I Radio-JNI: register_android_hardware_Radio DONE
    03-28 09:47:28.218 2579 2579 D AndroidRuntime: Calling main entry com.android.commands.am.Am
    03-28 09:47:28.222 1524 1972 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.MobileApp.Android/md52756a63cade81005e12b999f52fa0153.SplashScreen} from uid 0 on display 0
    03-28 09:47:28.223 2579 2579 D AndroidRuntime: Shutting down VM

  • kenneth.leekenneth.lee USMember ✭✭✭

    Failure copying native libraries [errorCode=-113] caught my eye which I had a quick google and someone said it was due to the emulator being x86 and the build option not including this platform. But i have no idea how to fix that... when i try to change the platform for one of my projects in Configuration Manager i get

    "There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\kenneth.lee\Documents\app_assistant\app_assistant\bin\x86\Debug\app_assistant.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project."

  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    Use an app like Native Libs Monitor from the Google Play Store to ensure that this library is making it inside your .APK.

    Or you can use a tool like apktool to see the libs folder and ensure there are contents.

  • kenneth.leekenneth.lee USMember ✭✭✭

    I have remade my emulator several times now since I last posted and I can't make it appear in my emulator anymore. So the apk is not making it into the emulator. However just building the apk on my desktop and checking its contents, it looks like all the content and dlls are inside.

  • kenneth.leekenneth.lee USMember ✭✭✭

    I came across a comment while trying to get Xamarin Android Player work and realised i didn't go Project Properties -> Android Options -> Advance Tab and toggle x86 on. Which seems to have done it.

  • AlanClarkAlanClark USMember ✭✭✭

    @kenneth.lee I find it unlikely that the x86 ABI is disabled in Debug config, but it's definitely worth checking.

    You can check this by right-clicking your project and going to Properties > Build > Android Build > Advanced

  • kenneth.leekenneth.lee USMember ✭✭✭
    edited April 2017

    @AlanClark Isnt that essentially the same thing only your steps are for xamarin studio and mine is for visual studio. I probably should have been more specific as to which operating system im using and IDE.

  • AlanClarkAlanClark USMember ✭✭✭

    @kenneth.lee Sorry - I actually had this thread open from the evening before and didn't see your last comment! I'm glad you managed to resolve that issue.

    As I mentioned in my other thread, Xamarin Android Player is deprecated and I would not recommend using it. Instead I'd recommend using the Google AVD for latest updates and API levels.

  • kenneth.leekenneth.lee USMember ✭✭✭

    @AlanClark Ah cool. Didn't know Xamarin Android Player is deprecated. I'll probably be using a x86 Intel emulator anyways since I finally got that to work. Thanks for the help.

Sign In or Register to comment.