Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package not working for different app variants like releaseStaging #28

Open
pankajgupta1 opened this issue Oct 20, 2020 · 4 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed platform: android Affects Android

Comments

@pankajgupta1
Copy link

I have these variants:

  1. debug
  2. release
  3. releaseStaging

import RNConfigReader from 'react-native-config-reader';

RNConfigReader is null for releaseStaging

@SuzanneHuntink
Copy link

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 #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"
            ...
        }
    }

@fernandopascoalbr
Copy link

fernandopascoalbr commented Mar 11, 2021

Some solution?

@ghadeeraqraa1992
Copy link

any solution ?

@prometheas prometheas added bug Something isn't working help wanted Extra attention is needed labels Feb 2, 2022
@prometheas
Copy link
Collaborator

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 🙂

@prometheas prometheas added the platform: android Affects Android label Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed platform: android Affects Android
Projects
None yet
Development

No branches or pull requests

5 participants