0
0
React Nativemobile~10 mins

Android build and signing in React Native - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to generate a release APK using Gradle.

React Native
./gradlew [1]
Drag options to blanks, or click blank then click option'
Aclean
BassembleRelease
CassembleDebug
Dbuild
Attempts:
3 left
💡 Hint
Common Mistakes
Using assembleDebug instead of assembleRelease
Running clean instead of assembleRelease
2fill in blank
medium

Complete the command to generate a signing key with keytool.

React Native
keytool -genkeypair -v -keystore [1] -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
Drag options to blanks, or click blank then click option'
Arelease-key.jks
Bdebug.keystore
Cmy-release-key.keystore
Dandroid.keystore
Attempts:
3 left
💡 Hint
Common Mistakes
Using debug.keystore for release signing
Using a file extension other than .keystore
3fill in blank
hard

Fix the error in the Gradle signing config by completing the missing property.

React Native
signingConfigs {
    release {
        storeFile file("[1]")
        storePassword "myStorePassword"
        keyAlias "my-key-alias"
        keyPassword "myKeyPassword"
    }
}
Drag options to blanks, or click blank then click option'
Amy-release-key.keystore
Bmy-release-key.jks
Crelease.keystore
Ddebug.keystore
Attempts:
3 left
💡 Hint
Common Mistakes
Using debug.keystore in release signing config
Using incorrect file path or name
4fill in blank
hard

Fill both blanks to configure the signing config in build.gradle.

React Native
android {
    signingConfigs {
        release {
            storeFile file("[1]")
            storePassword "[2]"
            keyAlias "my-key-alias"
            keyPassword "myKeyPassword"
        }
    }
}
Drag options to blanks, or click blank then click option'
Amy-release-key.keystore
BmyStorePassword
Cdebug.keystore
DdebugPassword
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing debug keystore with release signing config
Using wrong passwords
5fill in blank
hard

Fill all three blanks to complete the release build type configuration.

React Native
android {
    buildTypes {
        release {
            signingConfig signingConfigs.[1]
            minifyEnabled [2]
            proguardFiles getDefaultProguardFile('[3]'), 'proguard-rules.pro'
        }
    }
}
Drag options to blanks, or click blank then click option'
Arelease
Btrue
Cproguard-android-optimize.txt
Ddebug
Attempts:
3 left
💡 Hint
Common Mistakes
Using debug signing config for release build
Setting minifyEnabled to false for release
Using wrong ProGuard file name