kanzitelli / rnn-starter

🤹 React Native Starter - Powered by cli-rn, React Native Navigation, Expo Modules, RNN Screens, RN UI lib, MMKV, Mobx, Reanimated 2, Dark Mode, Splash Screen, Localization, Notifications, Permissions, and much more.
https://starters.dev
MIT License
549 stars 72 forks source link

Expo Modules not working due to expo-file-system #74

Closed Albermonte closed 2 years ago

Albermonte commented 2 years ago

Seems like any Expo module that needs file system operations won't work.

I have prepared a small example, but basically just add any module that depends on expo-file-system like Font, AV, GL... to this project and it won't work. This is the error:

Error: The method or property expo-file-system.downloadAsync is not available on android, are you sure you've linked all the native dependencies properly?

I couldn't find any solution online, but I'm guessing it comes from the expo package and probably due to having an empty MainActivity.java file?

kanzitelli commented 2 years ago

hey @Albermonte!

It was done in purpose as Expo SDK 44 with all related packages support RN 0.64 (if I am not mistaken), however the starter uses as newest version as possible (RN 0.66.4). So there was a problem running expo-file-system package with current RN version and I have just excluded it from the builds. You can check it in package.json->expo->autolinking.

I am pretty sure it will be solved when expo-file-system will support newer RN versions. Or what you can also do is to downgrade RN in this starter and try using expo-file-system package.

Hope it helps :)

Albermonte commented 2 years ago

Oh okey, didn't see that line. Now everything makes sense, deleting those lines and downgrading works. Thanks