Google Play error when uploading Flutter app debuggable

。_饼干妹妹 提交于 2019-12-01 07:38:29

You have to create your signing config for release mode, in your current file your are using signing config from debug.

 buildTypes {
    release {
        signingConfig signingConfigs.debug   //for this reason google doesn't allow you to upload the apk
    }
}

Create a signing configuration inside your gradle file :

        android {
            ...
            signingConfigs {
                release {
                    storeFile file("release.keystore")
                    storePassword "******"
                    keyAlias "******"
                    keyPassword "******"
                }
            }
            buildTypes {
                release {
                    signingConfig signingConfigs.release
                }
            }
        }

You'll have to generate an upload key and keystore.

In the menu bar, click Build > Generate Signed Bundle/APK.

In the Generate Signed Bundle or APK dialog, select Android App Bundle or APK and click Next.

Below the field for Key store path, click Create new.

Fill-in the required fields : path, password, key, password, validity years, certificate details (name, org unit, etc.)

Click Ok.

To build, go to menu > Build > Generate Signed Bundle/APK.

Select release mode and don't forget to check on both V1 and V2

The above information is taken from Android Developer User Guide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!