package not working for different app variants like releaseStaging
I have these variants:
- debug
- release
- releaseStaging
import RNConfigReader from 'react-native-config-reader';
RNConfigReader is null for releaseStaging
I also had this problem when I started using debug, staging and release build variants. These build variants each had their own applicationIdSuffix, which was causing the problem.
As per https://github.com/csath/react-native-config-reader/issues/26, adding the following to the defaultConfig solved it:
resValue "string", "rn_config_reader_custom_package", "my.package.app" (the applicationId without the suffix)
defaultConfig {
applicationId "my.package.app"
resValue "string", "rn_config_reader_custom_package", "my.package.app" //Add this line here
buildConfigField "String", "CONFIGKEY", '"Dummy"'
}
buildTypes {
debug {
applicationIdSuffix ".debug"
...
}
release {
applicationIdSuffix ".prod"
...
}
staging {
applicationIdSuffix ".acc"
...
}
}
Some solution?
any solution ?
Hello, everyone. I thought I'd introduce myself as a new maintainer for this project, pitching in to try and help the author, who has become very busy with personal matters (some more info available on the matter on #41).
That said, I'm afraid I don't (presently, anyway) have great insight to offer on this particular problem, as I'm particularly weak on the Android side of things at this time. That said, I both eager strengthen my Android skills and very happy to review PRs from the community 🙂