Android and .htaccess with IP restriction in Nextcloud

Apache 2.2 Configuration works with Cryptomator:

#Restrict IP
order deny,allow
deny from all
allow from XXX.XXX.XXX.XXX
allow from XXX.XXX.XXX.XXX
allow from XXX.XXX.XXX.XXX

Apache 2.4 configuration does not work with Cryptomator AND Android. Windows and Mac systems are fine with that configuration:

#Restrict IP
RequireAny
Require ip XXX.XXX.XXX.XXX
Require ip XXX.XXX.XXX.XXX
Require ip XXX.XXX.XXX.XXX
RequireAny
I cannot put the “code letters” before RequireAny!!!

Any ideas why?