react-native-nitro-sqlite icon indicating copy to clipboard operation
react-native-nitro-sqlite copied to clipboard

Expo 48 Android Build Error

Open elevyg opened this issue 2 years ago • 7 comments

I'm facing the same issue presented here: https://github.com/ospfranco/react-native-quick-sqlite/issues/118

Any idea what can it be? I can help on fixing it but do not have much experience with this kind of configuraitons.

elevyg avatar Apr 10 '23 19:04 elevyg

Same problem. I'm guessing you are trying to build through EAS and since you don't have a root android config it will fail on:

def USE_HERMES = rootProject.ext.hermesEnabled

I used patch-package to just set it manually, but it would obviously be better to just fix the build script in the package. Someone with more experience with expo build steps and configuration can probably come up with a better solution :)

Would be great if this library would work out of the box with Expo EAS since expo-sqlite have messed up sqlite versions and problems with transactions.

eriklovdahl avatar Apr 28 '23 21:04 eriklovdahl

I ended up doing the same!

elevyg avatar May 03 '23 15:05 elevyg

i used this package to solve it https://www.npmjs.com/package/expo-gradle-ext-vars

farmstrong8 avatar May 24 '23 12:05 farmstrong8

in the root build gradle file:

ext {
  hermesEnabled = (findProperty('expo.jsEngine') ?: "hermes") == "hermes"
}

earonesty avatar Jun 17 '23 05:06 earonesty

@elevyg thank you for creating the issue, can you please provide a reproduction example? :)

Montchy avatar Aug 14 '23 07:08 Montchy

I found the issue in here. Beside update minSdkVersion, I also modify app.json to enable hermes

  "expo": {
      ...
      "jsEngine": "hermes"
      ...
   }

But does anyone know why it doesn't work with npx expo start? Using eas build or npx expo run:android just take too long to restart the app.

ntuong196 avatar Jul 03 '24 03:07 ntuong196

Try delete folder:

node_modules/react-native-quick-sqlite/android/.cxx/Debug

After delete folder, run android again.

npx react-native run-android

Its worked for me!

leogaletti avatar Jul 05 '24 13:07 leogaletti