Native library libc49b.so doesn't support 16KB page sizes - Blocks Android 15 compatibility and Play Store submissions
Describe the issue
The react-native-square-in-app-payments package includes a native library (libc49b.so) that only supports 4KB page sizes. This prevents apps from being compatible with Android 15 (API 35) devices using 16KB page sizes and blocks Play Store submissions that target Android 15.
When analyzing the APK/AAB, the build system reports: ArchivePathEntry: pathPrefix="", path="/lib/arm64-v8a/libc49b.so" This supports 4KB
Environment
Package version: [email protected] React Native version: 0.81.5 Target SDK: Android 15 (API 35) Build system: Gradle Expo SDK: 54.0.0
Library Details
The problematic library appears in all architectures: lib/arm64-v8a/libc49b.so (460,688 bytes) lib/armeabi-v7a/libc49b.so (256,056 bytes) lib/x86/libc49b.so (334,388 bytes) lib/x86_64/libc49b.so (398,552 bytes)
To Reproduce
- Create React Native app with [email protected]
- Configure for Android 15:
gradle // android/app/build.gradle
android {
compileSdkVersion 36
defaultConfig {
targetSdkVersion 35
}
}
- Add 16KB page size property to AndroidManifest.xml:
<application>
<property android:name="android.app.16kb_pages.enabled" android:value="true"/>
</application>
- Build release bundle: ./gradlew bundleRelease
- Analyze the bundle: unzip -l app-release.aab | grep libc49b.so
Thank you for making an update on this but the new changes throw the following error:
Error: While trying to resolve module
react-native-square-in-app-paymentsfrom file/.../hooks/squareSDK/useSquare.tsx, the package/.../node_modules/react-native-square-in-app-payments/package.jsonwas successfully found. However, this package itself specifies amainmodule field that could not be resolved
(/.../node_modules/react-native-square-in-app-payments/lib/module/index.js. Indeed, none of these files exist:
* /.../node_modules/react-native-square-in-app-payments/lib/module/index.js(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
* /.../node_modules/react-native-square-in-app-payments/lib/module/index.js/index(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
Error: While trying to resolve module
react-native-square-in-app-paymentsfrom file...hooks/squareSDK/useSquare.tsx, the package/.../node_modules/react-native-square-in-app-payments/package.jsonwas successfully found. However, this package itself specifies amainmodule field that could not be resolved
(/Users/talha/Desktop/WorkSpace/02_React_Native_Projects/01_EZ_MOBILE_APP/Mobile_app_react/ezmobile-app/node_modules/react-native-square-in-app-payments/lib/module/index.js. Indeed, none of these files exist:
* /.../node_modules/react-native-square-in-app-payments/lib/module/index.js(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
* /.../node_modules/react-native-square-in-app-payments/lib/module/index.js/index(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
at DependencyGraph.resolveDependency (/.../node_modules/metro/src/node-haste/DependencyGraph.js:251:17)
at /.../node_modules/metro/src/lib/transformHelpers.js:161:21
at resolveDependencies (/.../node_modules/metro/src/DeltaBundler/buildSubgraph.js:43:25)
at visit (/.../node_modules/metro/src/DeltaBundler/buildSubgraph.js:81:30)
at processTicksAndRejections (node:internal/process/task_queues:103:5)
at async Promise.all (index 45)
at visit (/.../node_modules/metro/src/DeltaBundler/buildSubgraph.js:90:5)
at async Promise.all (index 13)
at visit (/.../node_modules/metro/src/DeltaBundler/buildSubgraph.js:90:5)
at async Promise.all (index 3)
Any update on this?
I ran into the same issue. Here's what helped me:
For 16KB page sizes compatibility, this comment was helpful: https://github.com/square/in-app-payments-react-native-plugin/issues/253#issuecomment-3445080350
After upgrading to the latest version (v2.0.0), I encountered module resolution issues. This workaround solved it for me: https://github.com/square/in-app-payments-react-native-plugin/issues/259#issuecomment-3675920343
I've also submitted a PR to fix the module resolution issue, but it hasn't been merged yet: https://github.com/square/in-app-payments-react-native-plugin/pull/260
Didn't work 😞
Any update on this?