How to compile mono for x86 android
I've tried many different ways. I have finished compiling with the NDK and when I run it on the emulator using the adp shell, I get no output.
mono-3.10.0 from a tarball
Here are my environment variables:
export CC=i686-linux-android-gcc
export SYSROOT=/home/XXUSERNAMEXX/Develop/android-ndk-r10d/platform/android-17/arch-x86
export PATH=/tmp/my-android-toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Here's my setup:
./configure --disable-mcs-build --host=i686-linux-android --prefix=/home/XXUSERNAMEXX/vmshare/workspace/HelloJni/jni/mono-2.0 --target=i686-linux-android --build=i686-linux-gnu
then just do then make install
Then create a sample C #: //HelloAndroid.cs // Output HelloAndroid.exe system usage;
namespace HelloAndroid
{
class MainClass
{
public static void Main (string[] args)
{
Console.WriteLine ("Hello World!");
}
}
}
then i copy mono-sgen libmonosgen-2.0.so HelloAndroid.exe to android directory
/data/data/com.example.helloandroid
change all permissions to 755 change all owners to system: system
then enter
./mono-sgen HelloAndroid.exe
in adp shell
then I just get nothing. no errors, no output, only command returns
+3
source to share