Como Release App

Asked

Viewed 68 times

1

I finished my app now leave ready for Play Store I saw on the website that I have to set up Gradle, add the release code.

I took this code and I still don’t understand how to use it.

release {
      storeFile file(RELEASE_STORE_FILE)
      storePassword RELEASE_STORE_PASSWORD
      keyAlias RELEASE_KEY_ALIAS
      keyPassword RELEASE_KEY_PASSWORD
    }

2 answers

2


  • 1

    is true! After made appeared the code in Gradle. Thanks!

1

In the archive build.gradle (Module:app) add the following code:

android {
    signingConfigs {
        config {
            keyAlias KEY_ALIAS
            keyPassword KEY_PASSWORD
            storeFile file(STORE_FILE)
            storePassword STORE_PASSWORD
        }
    }
....
}

This contains the information for signing apk. This information is in the archive grade.properties:

STORE_FILE=../SEU_AQUIVO_DE_ASSINATURA.keystore
STORE_PASSWORD=SUA SENHA 
KEY_ALIAS=SEU ALIAS
KEY_PASSWORD=SUA SENHA DO ALIAS

In this case, we leave the SEU_AQUIVO_DE_ASSINATURA at the project root (next to the app folder).

Now we will inform you that we will use this subscription in the build ( signingConfig signingConfigs.config):

buildTypes {
// Release
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.config
    }
//Debug
    debug {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.config
    }
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.