Skip to content
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

[BUG]: Android build fail on RN 0.77 #50

Open
2 of 3 tasks
bigriot opened this issue Feb 7, 2025 · 7 comments
Open
2 of 3 tasks

[BUG]: Android build fail on RN 0.77 #50

bigriot opened this issue Feb 7, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@bigriot
Copy link

bigriot commented Feb 7, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Name, Version of @react-native-kakao/*

2.2.6

Version of react-native

0.77

What os are you seeing the problem on?

Android

What device types are you seeing the problem on?

Simulator

What architecture types of react native are you seeing the problem on?

Old Architecture(Bridge)

Version of device(android API, iOS OS version, etc...)

Android API 34

Expo App

  • I am using Expo

What happened?

Encountered build failure while upgrading to RN 0.77.

The failure appears to be two-fold:

  1. RN 0.77 requires minSDK 24
  2. it appears that com.facebook.react.bridge.ReadableMap is no longer nullable, thus resulting in
    Argument type mismatch: actual type is 'com.facebook.react.bridge.ReadableMap?', but 'com.facebook.react.bridge.ReadableMap' was expected.

at RNCKakaoUtil.kt:80:15

Relevant a package.json.

{
"dependencies": {
    "@actbase/react-daum-postcode": "^1.0.4",
    "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
    "@gorhom/bottom-sheet": "^5.0.6",
    "@invertase/react-native-apple-authentication": "^2.4.0",
    "@native-html/iframe-plugin": "^2.6.1",
    "@react-native-clipboard/clipboard": "^1.16.1",
    "@react-native-firebase/analytics": "^21.7.2",
    "@react-native-firebase/app": "^21.7.2",
    "@react-native-firebase/messaging": "^21.7.2",
    "@react-native-google-signin/google-signin": "^13.1.0",
    "@react-native-kakao/core": "^2.2.6",
    "@react-native-kakao/user": "^2.2.6",
    "@react-navigation/bottom-tabs": "^7.2.0",
    "@react-navigation/drawer": "^7.1.1",
    "@react-navigation/elements": "^2.2.5",
    "@react-navigation/material-bottom-tabs": "^6.2.29",
    "@react-navigation/native": "^7.0.14",
    "@react-navigation/native-stack": "^7.2.0",
    "@rneui/base": "^4.0.0-rc.8",
    "@rneui/themed": "^4.0.0-rc.8",
    "@shopify/flash-list": "^1.7.3",
    "@tanstack/query-sync-storage-persister": "^5.66.0",
    "@tanstack/react-query": "^5.66.0",
    "@tanstack/react-query-persist-client": "^5.66.0",
    "axios": "^1.7.9",
    "dayjs": "^1.11.13",
    "i18n-js": "^4.5.1",
    "react": "18.3.1",
    "react-native": "0.77.0",
    "react-native-audio-recorder-player": "^3.6.12",
    "react-native-autolink": "^4.2.0",
    "react-native-blob-util": "^0.21.2",
    "react-native-calendars": "^1.1308.1",
    "react-native-config": "^1.5.5",
    "react-native-device-info": "^14.0.4",
    "react-native-dialog": "^9.3.0",
    "react-native-document-picker": "^9.3.1",
    "react-native-fast-collapsible": "^1.1.2",
    "react-native-gesture-handler": "^2.22.1",
    "react-native-iap": "^12.16.2",
    "react-native-image-picker": "^8.0.0",
    "react-native-localize": "^3.4.1",
    "react-native-mmkv": "2.12.2",
    "react-native-pager-view": "^6.7.0",
    "react-native-paper": "^5.13.1",
    "react-native-paper-dates": "^0.22.34",
    "react-native-permissions": "^5.2.5",
    "react-native-pure-jwt": "^3.0.3",
    "react-native-reanimated": "3.16.7",
    "react-native-reanimated-carousel": "^3.5.1",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "^5.2.0",
    "react-native-screens": "^4.6.0",
    "react-native-select-dropdown": "^4.0.1",
    "react-native-svg": "^15.11.1",
    "react-native-system-navigation-bar": "^2.6.4",
    "react-native-tab-view": "^4.0.5",
    "react-native-toast-message": "^2.2.1",
    "react-native-vector-icons": "^10.2.0",
    "react-native-video": "^6.10.0",
    "react-native-webview": "^13.13.2",
    "react-native-youtube-iframe": "^2.3.0",
    "semver": "^7.7.1",
    "usehooks-ts": "^3.1.1"
  },
  "devDependencies": {
    "@babel/core": "^7.26.0",
    "@babel/preset-env": "^7.26.0",
    "@babel/runtime": "^7.26.0",
    "@react-native-community/cli": "15.0.1",
    "@react-native-community/cli-platform-android": "15.0.1",
    "@react-native-community/cli-platform-ios": "15.0.1",
    "@react-native/babel-preset": "0.77.0",
    "@react-native/eslint-config": "0.77.0",
    "@react-native/metro-config": "0.77.0",
    "@react-native/typescript-config": "0.77.0",
    "@tsconfig/react-native": "^3.0.5",
    "@types/jest": "^29.5.13",
    "@types/react": "^18.3.18",
    "@types/react-test-renderer": "^18.3.1",
    "babel-plugin-inline-import": "^3.0.0",
    "eslint": "^9.17.0",
    "jest": "^29.7.0",
    "pod-install": "0.3.4",
    "prettier": "^3.4.2",
    "react-native-clean-project": "^4.0.3",
    "react-native-svg-transformer": "^1.5.0",
    "react-test-renderer": "18.3.1",
    "typescript": "^5.7.3"
  },
  "jest": {
    "preset": "react-native"
  },
  "engines": {
    "node": ">=18"
  },
  "packageManager": "[email protected]"
}

Relevant log output

> Task :react-native-kakao_core:processDebugAndroidTestManifest FAILED
/Users/joon/Dev/repostiories/hermione/node_modules/@react-native-kakao/core/android/build/intermediates/tmp/manifest/androidTest/debug/tempFile1ProcessTestManifest1241752332210700179.xml:5:5-74 Error:
	uses-sdk:minSdkVersion 21 cannot be smaller than version 24 declared in library [com.facebook.react:react-android:0.77.0] /Users/joon/.gradle/caches/8.10.2/transforms/88ffa52577eee7a453e7cd98a207eaf2/transformed/react-android-0.77.0-debug/AndroidManifest.xml as the library might be using APIs not available in 21
	Suggestion: use a compatible library with a minSdk of at most 21,
		or increase this project's minSdk version to at least 24,
		or use tools:overrideLibrary="com.facebook.react" to force usage (may lead to runtime failures)


e: file:///****/node_modules/@react-native-kakao/core/android/src/main/java/net/mjstudio/rnkakao/core/util/RNCKakaoUtil.kt:80:15 Argument type mismatch: actual type is 'com.facebook.react.bridge.ReadableMap?', but 'com.facebook.react.bridge.ReadableMap' was expected.

Reproducible Sample Repository

https://github.com/bigriot/kakao-rn77

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bigriot bigriot added the bug Something isn't working label Feb 7, 2025
@mym0404
Copy link
Owner

mym0404 commented Feb 7, 2025

I'm going to review this issue sometime soon. thank you.

It was caused by breaking change in 0.77 link

@rarira
Copy link

rarira commented Feb 8, 2025

@bigriot As a quick fix, you can apply the patch package below to make the build work.
https://gist.github.com/rarira/287d9d6fffa71f861636b883db333dca

@mym0404 I was going to submit a PR, but the example app keeps failing to build, so I'm sharing this for now.

@bigriot
Copy link
Author

bigriot commented Feb 9, 2025

@bigriot As a quick fix, you can apply the patch package below to make the build work. https://gist.github.com/rarira/287d9d6fffa71f861636b883db333dca

@mym0404 I was going to submit a PR, but the example app keeps failing to build, so I'm sharing this for now.

Thank you! I'll give it a try asap.

@bigriot
Copy link
Author

bigriot commented Feb 9, 2025

@bigriot As a quick fix, you can apply the patch package below to make the build work. https://gist.github.com/rarira/287d9d6fffa71f861636b883db333dca

@mym0404 I was going to submit a PR, but the example app keeps failing to build, so I'm sharing this for now.

Image

Your patch get's the compile stage going, but still getting cast exception at runtime unfortunately

@rarira
Copy link

rarira commented Feb 9, 2025

@bigriot I met similar error while building example app of this library regardless of this patch. So I think it might be react native 0.77 issue and I found the same issue: facebook/react-native#49075

@bigriot
Copy link
Author

bigriot commented Feb 10, 2025

@rarira I guess we'll just have to wait for now :) Thank you for helping out, much appreciated!

@mym0404 mym0404 pinned this issue Feb 27, 2025
@mym0404
Copy link
Owner

mym0404 commented Feb 27, 2025

I'd recommend the @rarira 's patch usimg patch package for now. Sorry for the inconvenience because I'm not able to access my laptop temporary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants