morrowdigital / watermelondb-expo-plugin

118 stars 30 forks source link

Android - SDK 51 - 'getJSIModulePackage' overrides nothing #45

Open maximedeoliveira opened 3 months ago

maximedeoliveira commented 3 months ago

Context

I have upgraded my application to Expo SDK 51, when I'm trying to build android, I have the following error :

MainApplication.kt:40:9 'getJSIModulePackage' overrides nothing

I have also tried to set "disableJSI": true inside the configuration, but it throws the same error.

Version

{
  "@morrowdigital/watermelondb-expo-plugin": "^2.3.2",
  "@nozbe/watermelondb": "^0.27.1",
  "expo": "~51.0.8",
  "expo-build-properties": "~0.12.1",
}

Reproduction

A reproduction is available here : https://github.com/maximedeoliveira/expo-watermelon-android

alexandre1921 commented 3 months ago

Same error on my app.

alexandre1921 commented 3 months ago

I think this is related to this: react native release-0.74#other-breaking-changes image So, I think the solution will take time.

alexandre1921 commented 3 months ago

On my app, I found a workroud, disable JSI and remove the getJSIModulePackage method on /android/app/src/main/java/com/yourapp/MainApplication.kt:40:9 and make another build: image

killerchip commented 3 months ago

Apologies guys, had no time to look into this yet. I suspect that this is something that WMDB has to fix first and then we update this plugin for the configuration.

killerchip commented 3 months ago

On my app, I found a workroud, disable JSI and remove the getJSIModulePackage method on /android/app/src/main/java/com/yourapp/MainApplication.kt:40:9 and make another build: image

Thanks @alexandre1921 . If you disable the JSI indeed it builds (as a workaround currently)

But you don't have to manually adjust the MainApplication.kt file. There is an error in our documentation.

To disable JSI you have to add: ["@morrowdigital/watermelondb-expo-plugin", { "disableJsi": true }], in the app.json and not disableJSI as stated in the README.md.

Will fix the documentation... And then try to find a solution to be able to enable JSI again.

dasjn commented 2 weeks ago

Hi @killerchip, have you been able to find a solution for the higher versions? I'm having the same problem with version 51. Thanks

HieronymusLex commented 2 weeks ago

@dasjn I believe WatermelonDB will first have to resolve https://github.com/Nozbe/WatermelonDB/issues/1769 in order for this plugin to support v51+ with JSI support since 0.74 introduced a breaking change to remove getJSIModulePackage