Skip to content

Android build error RN 0.78. #826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LeandroRibeiroo opened this issue Feb 21, 2025 · 2 comments · Fixed by #827
Closed

Android build error RN 0.78. #826

LeandroRibeiroo opened this issue Feb 21, 2025 · 2 comments · Fixed by #827
Assignees
Labels
🤖 android Android specific 🐛 bug Something isn't working build error Anything that triggers build errors and prevent this library from being used deps update Upgrade dependencies of the project 🏭 fabric Changes specific to new (fabric/jsi) architecture repro provided Issue contains reproduction repository/code

Comments

@LeandroRibeiroo
Copy link

Describe the bug
Error while trying to build an android version.

Code snippet

Task :react-native-keyboard-controller:compileReleaseKotlin FAILED
e: file:///Users/myuser/myfolder/company/app/node_modules/react-native-keyboard-controller/android/src/fabric/java/com/reactnativekeyboardcontroller/KeyboardControllerViewManager.kt:21:51 Type argument is not within its bounds: should be subtype of 'android.view.View'.
e: file:///Users/myuser/myfolder/company/app/node_modules/react-native-keyboard-controller/android/src/fabric/java/com/reactnativekeyboardcontroller/KeyboardGestureAreaViewManager.kt:21:51 Type argument is not within its bounds: should be subtype of 'android.view.View'.
e: file:///Users/myuser/myfolder/company/app/node_modules/react-native-keyboard-controller/android/src/fabric/java/com/reactnativekeyboardcontroller/OverKeyboardViewManager.kt:22:51 Type argument is not within its bounds: should be subtype of 'android.view.View'.

To Reproduce
Steps to reproduce the behavior:

  1. bun install
  2. cd android
  3. ./gradlew assembleRelease
  4. See error

Expected behavior
The creation of an Android version of the app.

Smartphone (please complete the following information):

  • Desktop OS: macOS Sequoia 15.3.1
  • RN version: 0.78.0
  • RN architecture: New
  • Library version: 1.16.4

Additional context
Upgrading my app to the new version of RN.

@kirillzyusko kirillzyusko added 🤖 android Android specific 🏭 fabric Changes specific to new (fabric/jsi) architecture deps update Upgrade dependencies of the project 🐛 bug Something isn't working repro provided Issue contains reproduction repository/code labels Feb 21, 2025
@kirillzyusko
Copy link
Owner

@LeandroRibeiroo can you check if #827 fixes the issue for you?

@adolfogc
Copy link

hey @kirillzyusko, I tried your patch and it cleared the build issue for me

kirillzyusko added a commit that referenced this issue Feb 22, 2025
## 📜 Description

Removed nullability of delegates.

## 💡 Motivation and Context

It was auto generated code by Android studio when original classes (from
react-native) had java classes.

Now they are defined in Kotlin and explicitly are marked as
non-nullable, so it conflicts with the code.

So in this PR I remove "nullability" of delegates - it still will be
compatible with older RN versions and new RN 0.78 will be supported too
🤞

Closes
#826

## 📢 Changelog

<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->

### Android

- removed nullability of delegates;

## 🤔 How Has This Been Tested?

Tested in RN 0.78 branch.

## 📸 Screenshots (if appropriate):

<img width="716" alt="image"
src="https://github.com/user-attachments/assets/cac7f148-725e-4c24-a89a-777c49e1c915"
/>

<img width="651" alt="image"
src="https://github.com/user-attachments/assets/9327ddb5-129d-4a18-b7b1-ff613e99ce48"
/>

## 📝 Checklist

- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed
@kirillzyusko kirillzyusko added the build error Anything that triggers build errors and prevent this library from being used label Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Android specific 🐛 bug Something isn't working build error Anything that triggers build errors and prevent this library from being used deps update Upgrade dependencies of the project 🏭 fabric Changes specific to new (fabric/jsi) architecture repro provided Issue contains reproduction repository/code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants