--- a/src/core/model/kid3application.cpp
+++ b/src/core/model/kid3application.cpp
@@ -928,7 +928,7 @@
       taggedFile->closeFileHandle();
     }
   }
-#if defined Q_OS_LINUX && !defined Q_OS_ANDROID
+#if defined Q_OS_LINUX && !defined Q_OS_ANDROID && !defined __ANDROID__
   if (::malloc_trim(0)) {
     qDebug("Memory released by malloc_trim()");
   }
