Forum Xamarin.Android

Android Build on Device stops launching after *some* time (weeks/months)

I've been getting a weird behaviour for some time now.

Any app I build within Xamarin studio to my phone works 100% fine (Debug/Release etc). However, sometime later, maybe only weeks, maybe months, the apps will no longer launch. The splash screen is shown but thats it, it locks up.

LogCat seems to show the app continuously trying to launch and being killed, relaunched, killed, relaunched etc.

This is an example error being repeatedly dumped to the log...

2020-01-05 11:06:12.009 30777-30777/? A/monodroid: No assemblies found in '/data/user/0/com.companyname.BookLib/files/.__override__' or '/storage/emulated/0/Android/data/com.companyname.BookLib/files/.__override__'. Assuming this is part of Fast Deployment. Exiting...

The full loop of output thats repeated over and over is

2020-01-05 11:06:11.725 30751-30751/? A/monodroid: No assemblies found in '/data/user/0/com.companyname.BookLib/files/.__override__' or '/storage/emulated/0/Android/data/com.companyname.BookLib/files/.__override__'. Assuming this is part of Fast Deployment. Exiting...
2020-01-05 11:06:11.752 1773-2180/? I/ActivityManager: Process com.companyname.BookLib (pid 30751) has died: fore TOP 
2020-01-05 11:06:11.752 1513-1513/? I/Zygote: Process 30751 exited cleanly (65)
2020-01-05 11:06:11.753 1773-1836/? W/libprocessgroup: kill(-30751, 9) failed: No such process
2020-01-05 11:06:11.753 1773-1836/? I/libprocessgroup: Successfully killed process cgroup uid 10251 pid 30751 in 0ms
2020-01-05 11:06:11.772 1773-1835/? I/ActivityManager: Start proc 30777:com.companyname.BookLib/u0a251 for activity com.companyname.BookLib/md54df24d340253ee98bc2d150f71258be8.SplashScreen
2020-01-05 11:06:11.777 30777-30777/? I/anyname.BookLi: Late-enabling -Xcheck:jni
2020-01-05 11:06:11.895 30777-30777/? I/anyname.BookLi: The ClassLoaderContext is a special shared library.
2020-01-05 11:06:11.950 30777-30777/? W/monodroid: Creating public update directory: `/data/user/0/com.companyname.BookLib/files/.__override__`
2020-01-05 11:06:11.950 30777-30777/? W/monodroid: Using override path: /data/user/0/com.companyname.BookLib/files/.__override__
2020-01-05 11:06:11.951 30777-30777/? W/monodroid: Trying to load sgen from: /data/user/0/com.companyname.BookLib/files/.__override__/libmonosgen-2.0.so
2020-01-05 11:06:11.951 30777-30777/? W/monodroid: Trying to load sgen from: /storage/emulated/0/Android/data/com.companyname.BookLib/files/.__override__/libmonosgen-2.0.so
2020-01-05 11:06:11.951 30777-30777/? W/monodroid: Trying to load sgen from: /storage/emulated/0/../legacy/Android/data/com.companyname.BookLib/files/.__override__/libmonosgen-2.0.so
2020-01-05 11:06:11.951 30777-30777/? W/monodroid: Trying to load sgen from: /data/app/com.companyname.BookLib-R2oWti-BpqsauU-YHmzS9g==/lib/arm64/libmonosgen-2.0.so
2020-01-05 11:06:11.951 30777-30777/? W/monodroid: Trying to load sgen from: /data/user/0/com.companyname.BookLib/files/.__override__/links/libmonosgen-2.0.so
2020-01-05 11:06:12.009 30777-30777/? A/monodroid: No assemblies found in '/data/user/0/com.companyname.BookLib/files/.__override__' or '/storage/emulated/0/Android/data/com.companyname.BookLib/files/.__override__'. Assuming this is part of Fast Deployment. Exiting...

Any ideas as to why this is happening with apps that I build to my phone? (Release build from AppCenter I believe work fine, but I need to test again in a few weeks to see if it fails :/ )

Again, just for clarity, Release builds to my device work fine initially and for a good while after.

Best Answer

  • Iain1986Iain1986 ✭✭
    edited January 5 Accepted Answer

    Ok should have googled more (and paid more attention to the Fast Deployment hint".

    By default, Xamarin loads libs into the user data when running in Debug Fast Deployment mode...so eventually when the cache for that app is cleared, the app will stop working.

    Its not happening after "some time", its just that I happened to either clear data...or rebooted the device.

    Quite a pain to track down that one.

    If you want Debug builds built to device to last,

    Android Project > Properties > Android Build > Packaging and Deployment, uncheck "Use Fast Deployment"

Answers

  • Iain1986Iain1986 Member ✭✭
    edited January 5 Accepted Answer

    Ok should have googled more (and paid more attention to the Fast Deployment hint".

    By default, Xamarin loads libs into the user data when running in Debug Fast Deployment mode...so eventually when the cache for that app is cleared, the app will stop working.

    Its not happening after "some time", its just that I happened to either clear data...or rebooted the device.

    Quite a pain to track down that one.

    If you want Debug builds built to device to last,

    Android Project > Properties > Android Build > Packaging and Deployment, uncheck "Use Fast Deployment"

Sign In or Register to comment.