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

Viewed 3114

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?

2 Answers

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.

These are defined in your build.gradle file.

Read more about it here

Edit: i missed it was about flutter. This is what the flutter documentation has to say:

Defaults to the value of Title.title, if a Title widget can be found. Otherwise, defaults to Platform.resolvedExecutable.

Related