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

[Question] application id not match with the id config in the corresponding env file #64

Open
thaiquoctoanvn opened this issue Dec 4, 2023 · 0 comments

Comments

@thaiquoctoanvn
Copy link

I have my .env like this

APP_NAME=DEV
APP_ID=au.com.myapp.dev

and my env.production like this

APP_NAME=PRO
APP_ID=au.com.myapp.pro

When I run the command flutter build apk --release on Android device I got the application id is au.com.myapp.dev but the app name is PRO. Can any help me explain what is the problem? Ii expect that the application id would be au.com.myapp.pro
My config in gradle likes this

apply from: project(':flutter_config').projectDir.getPath() + "/dotenv.gradle"
project.ext.envConfigFiles = [
        staging: ".env.staging",
        release: ".env.production",
        anothercustombuild: ".env",
]
android {
defaultConfig {
        applicationId project.env.get("APP_ID")
        versionCode project.env.get("VER_CODE").toInteger()
        versionName project.env.get("VER_NAME")
        minSdkVersion 24
        targetSdkVersion flutter.targetSdkVersion
        resValue "string", "build_config_package", "com.example.electronic_vhc"
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant