0
votes

I need to run some C# code on Android x86_64 Marshmallow platform -- mostly NUnit 2 tests and some console apps (please don't ask why :)

I've figured out to compile Mono 4.4.2 using Android NDK r13b, I got the bin folders (with mono-sgen and other binaries), I got the lib folder with all these libmonosgen-2.0.so and others. I have a separate question about some building and configuration issues -- What is the proper way to install Mono 4.4.2 on Android x86_64? so I would be very grateful if you will take a look there also.

In general -- it works. After setting LD_LIBRARY_PATH & MONO_PATH I can do: mono [app.exe], I can compile simple programs from source, I can run nunit-console.exe from lib/mono/4.5 folder and even my simple tests run.

Problems begin when I try to run some more sophisticated tests which use more references, of course they are all cross-platform and do work in Linux, for example. I couldn't run simple test which use EPPlus.dll to read MS Excel files - I do see the runner screen, sometimes it tries to run something, sometimes not. When I try to run different runner version - it simply doesn't work, without a word. I suspect this is all related to Frameworks versions, assembly versions and so on. But how do I know?

enter image description here

So my main question is - how do I know what happened? mono --trace prints nothing, any ideas why? What instruments do I have in such scenarios, how can I figure something out? It's the same with emulator and a real device.

Thanks a lot.

1
it feels that you're doing work very related to the internals of mono, so maybe you can get better help if you join the #mono-dev channel (or mono's gitter channel) instead of stackoverflowknocte
Thanks, I will try this! But I also have a feeling that this somehow related to the Android (NDK), since it works well on Linux. So I will try my luck there also :)natan337

1 Answers

0
votes

Well, the '--trace' option does work in Android. It just doesn't print anything to the stdout, logcat is used instead (tagged as 'mono'). I suppose there's #ifdef somewhere which redefines printf with something Anroid-related.