Android Configuration

Estimated reading: 4 minutes 89 views

Opening Android Module

  • The Android module can be accessed in Two ways
  1. Select the Android Module from the same project you’re attempting to open by going to File -> Open

   2. Navigate to Tools -> Flutter -> Android Studio-> Open Android Module

Changing the Application Id

IMPORTANT

Every Android app has a unique application ID that looks like a Java package name, such as com.example.myapp. This ID uniquely identifies your app on the device and in Google Play Store. Once you publish your app, you should never change the Application ID

  • For Application ID just change in build.gradle at app level only
  • You can locate the build.gradle file on this path android/app/build.gradle
  • This Application Id will be used in firebase to setting up the firebase
defaultConfig {
    applicationId "YOUR_PACKAGE_NAME"
    minSdkVersion 21
    targetSdkVersion 31
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Changing the Version Name

IMPORTANT

The version name is a string value that represents the “friendly” version name displayed to the users. Version name is displayed to the user.

  • For Version Name just change in build.gradle at app level only
  • You can locate the build.gradle file on this path android/app/build.gradle
defaultConfig defaultConfig {
    applicationId "com.iqonic.example"
    minSdkVersion 21
    targetSdkVersion 31
    versionCode 1
    versionName "CHANGE_THE_VERSION_NAME"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Changing the Version Code

IMPORTANT

The version code is an incremental integer value that represents the version of the application code.Version code is used by google play store for new update. If you have increased version code then update will be visible to all user.

  • For Version Code just change in build.gradle at app level only
  • You can locate the build.gradle file on this path android/app/build.gradle
defaultConfig defaultConfig {
    applicationId "com.iqonic.example"
    minSdkVersion 21
    targetSdkVersion 31
    versionCode "CHANGE_THE_VERSION_CODE"
    versionName "1.0.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Changing the Appname from manifest file

IMPORTANT

Whenever you make a project in Android studios you give a project name, your app’s name is derived from that. The user will know your app with this name on Google PlayStore.

  • To change the name of your Android application in Android Studio, you have to change the value of the property android:label defined inside the Application node in AndroidManifest.xml
 android:label="YOUR_APP_NAME"

Changing the App Icon

IMPORTANT

Android Studio includes a tool called Image Asset Studio that helps you generate your own app icons from material icons, custom images, and text strings. It generates a set of icons at the appropriate resolution for each pixel density that your app supports. Image Asset Studio places the newly generated icons in density-specific folders under the res/ directory in your project. At runtime, Android uses the appropriate resource based on the screen density of the device your app is running on.
Image Asset Studio helps you generate the following icon types:

  • Launcher icons
  • Action bar
  • tab icons Notification icons

  • Go to android/app/src/main/res then right click on the res folder and New -> Image Asset then the dialog will open.
  • Then Select the Image and then click on next and then finish

Add Google JSON file

IMPORTANT

As part of enabling Google APIs or Firebase services in your Android application. Click Here to set up firebase and download google JSON file 

Generating Signed APK

  1. Open the build -> Generate Signed Bundle/APK -> Select APK and click next
  • Now you will have two options create a new Keystore or choose existing keystore.
  • If you choose NEW keystore, a dialogue will appear in which you must specify the path of the keystore and give it a name.
  • Then enter your password and confirm it. Select the Alias name, confirm the password, and enter any additional information before clicking OK. Your key store has been created.
  • Then click the next button, choose the release mode, and begin building the apk.
NOTE

To Publish the app in Google Play Store, you will need the AAB(Android App Bundle), So to create the AAB, you have to follow the same steps, just that you have to select the AAB option in step 2 instead of APK

Great! You have successfully configured Android Module!

Leave a Comment

Share this Doc

Android Configuration

Or copy link

CONTENTS