diff --git a/spatialite_xml2utf8.c b/spatialite_xml2utf8.c
index d88202d..bd524d5 100644
--- a/spatialite_xml2utf8.c
+++ b/spatialite_xml2utf8.c
@@ -45,7 +45,7 @@ extern const char *locale_charset (void);
 #include <localcharset.h>
 #endif /* end localcharset */
 #else /* not MINGW32 - WIN32 */
-#if defined(__APPLE__) || defined(__ANDROID__)
+#if defined(__APPLE__) || (defined(__ANDROID__) && __ANDROID_API__ < 28)
 #include <iconv.h>
 #include <localcharset.h>
 #else /* neither Mac OsX nor Android */
