Reputation: 157
I'm newbie in RN. I have a problem with building release APK. I'm doing following steps:
react-native bundle
--platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets dest android/app/src/main/res/
app/build.gradle:
project.ext.react = [
entryFile: "index.js",
bundleInDebug: true,
bundleInRelease: true,
]
apply from: "../../node_modules/react-native/react.gradle"
....
It seems bundleInRelease option is not working properly. However ./gradlew assembleDebug works perfect! Please help!
Upvotes: 1
Views: 4864
Reputation: 157
Solved!
I used 'react-native-bitcoinjs-lib' library and the thing is the library was not fully configured. By documentation, for generating release APK, additionally, I had to create file in project named metro.config.js. And wrote following code in it:
module.exports = {
transformer: {
minifierConfig: {
mangle: {
keep_fnames: true
}
}
}
}
Now, everything works fine.
Upvotes: 2