I am following React Native 0.67.4
instruction to generate keys and sign config before building release package. The app runs fine in Android emulator (Android Studio 2120.1.1 Patch2
). But when building release package, both ./gradlew assembleRelease
and ./gradlew bundleRelease
has the same error as below:
Task :app:signReleaseBundle FAILED
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:signReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
> java.lang.NullPointerException (no error message)
Tried the following in the post:
- Deleted all under ./gradle and
yarn run android
- ./gradlew clean many times
Android studio 2021.1.1 Patch2
, Gradle React Native plugin version 7.2.1/(gradle 7.4.1)
.
Here is part of package.json
:
"dependencies": {
"@ethersproject/shims": "^5.6.0",
"@react-native-community/toolbar-android": "^0.2.1",
"@react-native-masked-view/masked-view": "^0.2.6",
"@react-native-picker/picker": "^2.4.0",
"@react-navigation/native": "^6.0.8",
"@react-navigation/stack": "^6.1.1",
"crypto-js": "^4.1.1",
"ethers": "^5.6.1",
"react": "17.0.2",
"react-native": "0.67.4",
"react-native-blob-util": "^0.14.1",
"react-native-confirmation-code-field": "^7.3.0",
"react-native-device-info": "^8.5.1",
"react-native-easy-grid": "^0.2.2",
"react-native-elements": "^3.4.2",
"react-native-encrypted-storage": "^4.0.2",
"react-native-flash-message": "^0.2.1",
"react-native-gesture-handler": "^2.3.2",
"react-native-get-random-values": "^1.7.2",
"react-native-gifted-chat": "^0.16.3",
"react-native-image-picker": "^4.7.3",
"react-native-loading-spinner-overlay": "^3.0.0",
"react-native-modal": "^13.0.1",
"react-native-reanimated": "^2.5.0",
"react-native-redash": "^16.2.3",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "^4.2.2",
"react-native-screens": "^3.13.1",
"react-native-vector-icons": "^9.1.0",
"rn-alioss": "^0.2.5",
"socket.io-client": "^4.4.1"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "7.14.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.66.2",
"react-test-renderer": "17.0.2"
},