Closed Kudo closed 1 year ago
### This issue was automatically imported from GitHub: [https://github.com/expo/expo/issues/24424](https://github.com/expo/expo/issues/24424) #### Issue accepted by brent --- ## Summary: * The user is having an issue with gradients not working on Android in the current version of Expo. * This issue can be reproduced using the snack provided in the ExpoLinearGradient section of the Expo docs. * The gradients seem to work as expected on iOS, but not on Android as is highlighted with the screenshots the user provided. * The user created a minimal reproducible example available at a provided GitHub link. * The underlying issue is not specified, so further investigation will be required to determine the cause for this unexpected behavior.
Why
expo-linear-gradient@12.1.2 on sdk 48 is broken on android: https://github.com/expo/expo/issues/24424 close ENG-10114
How
expo-linear-gradient 12.1.1 <-> 12.1.2 does not change anything from js side. i think the problem is coming from snackager. comparing the two bundles:
my hypotheses are:
@babel/runtime
expo-modules-core@*
in this case.the solution is passing exact @babel/runtime version to install. that could prevent the inconsistent version between @babel/plugin-transform-runtime and @babel/runtime. ~since our @babel/runtime is 7.12.5, we could also use the explicit
useESModules
.~ To fix the expo-modules-core breaking change, now this pr tries to fetchbundledNativeModules
from api server and install recommended versions accordingly.Test Plan
deploy staging to test the test case from https://staging-snack.expo.dev/@kudochien/linear-gradient. may wait 24 hrs for cloudfront to purge the cache.