Android Configuration
This section covers the configurations required for Android platform.
Icons
Create your app icon ic_launcher and notification icon ic_notification folders from Launcher icon generator. Place the generated icons inside the following folders:
/mipmap-hdpiin/android/app/src/main/res/folder/mipmap-mdpiin/android/app/src/main/res/folder/mipmap-xhdpiin/android/app/src/main/res/folder/mipmap-xxhdpiin/android/app/src/main/res/folder/mipmap-xxxhdpiin/android/app/src/main/res/folder
Get Dependencies
Run the following command to download the required dependencies for the app.
flutter pub getChange Package Name
-
Open
/android/app/build.gradleand change the package namedefaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "YOUR_PACKAGE_NAME"
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}In the above code, replace
YOUR_PACKAGE_NAMEwith something likecom.company.projectify -
Open
/android/app/src/main/AndroidManifest.xmland specify your:- YOUR_PACKAGE_NAME
- YOUR_APPLICATION_NAME
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="YOUR_PACKAGE_NAME">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="YOUR_APPLICATION_NAME"
android:icon="@mipmap/ic_launcher">In the above code,
replaceYOUR_PACKAGE_NAMEwith something likecom.company.projectifyand
replaceYOUR_APPLICATION_NAMEwith something likeProjectify -
Open
/android/app/src/debug/AndroidManifest.xmland/android/app/src/profile/AndroidManifest.xmlspecify your:- YOUR_PACKAGE_NAME
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="YOUR_PACKAGE_NAME">In the above code, replace
YOUR_PACKAGE_NAMEwith something likecom.company.projectify -
Open
/android/app/src/main/java/PACKAGE_NAME_FOLDERS/MainActivity.ktand change the package namepackage YOUR_PACKAGE_NAME;
In the above code, replace
YOUR_PACKAGE_NAMEwith something likecom.company.projectify