Android Studio: Build Signed Release Apps

From OnnoWiki
Jump to navigation Jump to search

Untuk membuat Signed Relase Apps

Pastikan ICON bukan Android Avatar

  • Delete Folder
res/drawable
res/mipmap
  • Generate Project > app > res > New > Image Asset & pilih Foreground > Source Asset = Image > Path
 Pilih Asset Background 


Select Variant

  • Project > Build > Select Build Variant > release

Edit build.gradle app

Edit Project > Grade Scripts > build.gradle app


Pastikan setting

  • signingConfigs - benar
  • di buildTyles - signingConfig signingConfigs.xxxxxx


android {
    compileSdk 32

    defaultConfig {
        applicationId "itts.onno.hms.ittsinternetoffline"
        minSdk 21
        targetSdk 32
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    signingConfigs {
        release {
            storeFile file('ittsinternetoffline.jks')
            keyAlias 'key0'
            keyPassword 'xxxxxxxxxxxxxxxx'
            storePassword 'xxxxxxxxxxxxxxx'
            v1SigningEnabled true
            v2SigningEnabled true
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}