Mono for Android preprocessor macros

2020-07-14 10:11发布

问题:

Is there an Android preprocessor macros that Mono for Android defines?

I mean very useful things for cross-platform development like:

#if WINDOWS...#endif 

and

#if WINDOWS_PHONE...#endif

回答1:

__ANDROID__

and additionally for each Android API Level:

__ANDROID_4__;__ANDROID_7__;__ANDROID_8__;etc