What does the ${applicationName} in flutter AndroidManifest.xml means?

1,708

This value is set by the Flutter Gradle plugin.

It can have 2 value :

If you have multidex enabled and your app has a minSdk less than 20, this value will be io.flutter.app.FlutterMultiDexApplication.

Else, it will be android.app.Application.

You can override this value by setting the base-application-name property (in the gradle.properties of your android folder for example).

Source : https://github.com/flutter/flutter/blob/master/packages/flutter_tools/gradle/flutter.gradle#L261

Remember that you can always inspect the resulting APK (in build/app/outputs/flutter-apk) to see what value is in the final Manifest. Or you can just read the merged manifest in build/app/intermediates/merged_manifests/debug/AndroidManifest.xml.

Share:
1,708
BambinoUA
Author by

BambinoUA

Expirienced in: Dart/Flutter WinDev/WebDev/WinDev Mobile PHP Clarion for Windows Microsoft C#

Updated on January 03, 2023

Comments

  • BambinoUA
    BambinoUA over 1 year

    The AndroidManifext.xml has this code:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.skeleton">
       <application
            android:label="skeleton"
            android:name="${applicationName}"
            android:icon="@mipmap/ic_launcher">
    
    

    On what real value the applicationName is interpolated?

  • BambinoUA
    BambinoUA about 2 years
    Well, I did search among all flutter project's files and didn't find any mention of applicationName. So what value is used for ${applicationName}?
  • Sambhav Khandelwal
    Sambhav Khandelwal about 2 years
    try checking strings.xml
  • BambinoUA
    BambinoUA about 2 years
    No such file in project directory. No any mention of applicationName in project's files.
  • Ivo
    Ivo about 2 years
    @BambinoUA sorry, i missed that this was about a flutter project. My answer works for native Android projects. I don't know how it works for flutter. Maybe you can find something in the flutter documentation about that
  • Ivo
    Ivo about 2 years
  • BambinoUA
    BambinoUA about 2 years
    @IvoBeckers, this is wrong answer unfortunately. The quoted property contains the path to executable system/bin/app_process32 but manifest refer to class name because I can replace it with .MainApplication. So the applicationName use some other value.