mirror of
https://github.com/status-im/react-native-config.git
synced 2025-02-23 12:28:11 +00:00
Add Proguard troubleshooting instructions to Readme
This commit is contained in:
parent
ee3a094c28
commit
f0ad581f96
10
README.md
10
README.md
@ -173,3 +173,13 @@ defaultConfig {
|
||||
resValue "string", "build_config_package", "YOUR_PACKAGE_NAME_IN_ANDROIDMANIFEST.XML"
|
||||
}
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Problems with Proguard
|
||||
|
||||
When Proguard is enabled (which it is by default for Android release builds), it can rename the `BuildConfig` Java class in the minification process and prevent React Native Config from referencing it. To avoid this, add an exception to `android/app/proguard-rules.pro`:
|
||||
|
||||
-keep class com.mypackage.BuildConfig { *; }
|
||||
|
||||
`mypackage` should match the `package` value in your `app/src/main/AndroidManifest.xml` file.
|
||||
|
Loading…
x
Reference in New Issue
Block a user