How to run Android apps created by Flutter separately in release and debug versions

Asked 1 years ago, Updated 1 years ago, 88 views

I'm testing the release version of the app on the actual machine, but when I run it from Android Studio (with --debug), I get an error (probably because the application ID is the same) and the app disappears.

buildTypes{
        debug {
            debugable true
            applicationIdSuffix ".debug"
        }

If you add , the application ID is <App ID>.debug, but it is different from the application ID in google-services.json, so you still get an error.To avoid errors, you must manually change the package_name in Google-services.json.
How can I automatically run it in debug mode?

android flutter

2022-09-30 19:37

1 Answers

Not verified, but
to the android/app/src/debug directory How about placing a copy of google-services.json that changed package_name?

https://stackoverflow.com/questions/38609868/android-buildtypes-applicationidsuffix-error

By the way, in my case, I prepare and separate Flavor.
https://flutter.dev/docs/deployment/flavors


2022-09-30 19:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.