-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersplatform: androidAffects AndroidAffects AndroidquestionFurther information is requestedFurther information is requested
Description
React Native: 61
Android: AndroidX
There seems to be an issue with assembling for release when using ProGuard:
android() {
...
buildTypes {
debug {
buildConfigField "String", "FOO", "\"bar\""
}
release {
buildConfigField "String", "FOO", "\"baz\""
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
...
}
In short, attempting to build via ./gradlew assembleRelease -x bundleReleaseJsAndAssets builds the project just fine, but it results in RN Config Reader throwing the following error:
ReactNative: RNConfigReader: Could not find BuildConfig class
The app assembles and works just fine using assembleDebug. All of the build variant BuildConfig files are properly automatically generated with the correct values.
import Config from 'react-native-config-reader'
export default class Root extends React.Component<void, void> {
constructor(props: any) {
super(props)
console.log('Config', JSON.stringify(Config))
}
}
Config returns null.
Any suggestions?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersplatform: androidAffects AndroidAffects AndroidquestionFurther information is requestedFurther information is requested