Can't find variable: Intl (only in android)

  1. expo --version: 4.13.0
  2. Platforms: android (error=‘Cant find variable: Intl’), iOS (it works perfectly)
  3. Code:
    " new Intl.NumberFormat(‘es-ES’), { style: ‘currency’, currency: ‘EUR’ }.format(number);"

To use Intl.NumberFormat() constructor, I get the error “Can’t find variable: Intl”, when I use an android device. On iOS, it works correctly.

Any idea how to fix it? Thanks

Hey @albertog, in order to use Intl on Android you have to build your binary with the intl JavaScriptCore flavor. You can designate which flavor of jsc to use in your app/build.gradle with the line:

def jscFlavor = 'org.webkit:android-jsc-intl:+'


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.