vonovak / react-native-theme-control

Natively control react native application theme at runtime and persist it for the next app start.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kotlin Compilation Errors in Android Build with Expo SDK 48

SMhdAsadi opened this issue · comments

Description:
I have installed the version 3.2.1 of @vonovak/react-native-theme-control library into my project, which is using Expo SDK 48. While I can successfully build the app for iOS, I am encountering Kotlin compile errors during the Android build process. Here's the specific error I'm facing:

* What went wrong:
Execution failed for task ':vonovak_react-native-theme-control:compileDebugKotlin'.
> Compilation error. See log for more details
...

Additionally, there are multiple unresolved references and errors related to method overrides and variable expectations within the ThemeControlModule.kt and ThemeControlPackage.kt files:

e: (path)\ThemeControlModule.kt: (18, 3): Unresolved reference: NativeThemeControlSpec
e: (path)\ThemeControlModule.kt: (19, 3): 'getName' overrides nothing
e: (path)\ThemeControlModule.kt: (23, 3): 'getThemePreference' overrides nothing
e: (path)\ThemeControlModule.kt: (29, 3): 'setNavbarAppearance' overrides nothing
e: (path)\ThemeControlModule.kt: (37, 29): Unresolved reference: currentActivity
e: (path)\ThemeControlModule.kt: (47, 16): Variable expected
e: (path)\ThemeControlModule.kt: (50, 16): Variable expected
e: (path)\ThemeControlModule.kt: (63, 3): 'setTheme' overrides nothing
e: (path)\ThemeControlModule.kt: (74, 31): Unresolved reference: currentActivity
e: (path)\ThemeControlModule.kt: (89, 17): Unresolved reference: reactApplicationContext
e: (path)\ThemeControlPackage.kt: (12, 49): Type mismatch: inferred type is ThemeControlModule but NativeModule? was expected

Steps to Reproduce:

  1. Install the library into a project using Expo SDK 48.
  2. Add the config plugin to app.json
  3. Build the app for Android.

Any insights or guidance on resolving these errors would be greatly appreciated.

Hello and thanks for reporting,
this is fixed in 3.2.3
Thank you 🙂