Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android - Difference between android:name and android:label

I am flutter developer and some Android settings confuses me.

What is the difference between android:label and android:name in AndroidManifest.xml??

<application
        android:name="io.flutter.app.FlutterApplication"
        android:label="flutterapp2"
        android:icon="@mipmap/ic_launcher">
like image 986
RaFiTa Avatar asked May 14 '26 12:05

RaFiTa


1 Answers

The

android:name="io.flutter.app.FlutterApplication"

is a default to a Flutter application & you should NOT edit this anyway (unless you created a class that extends FlutterApplication class).

The android:label is to define your app name, which is display in the installed application list.

If you want to change the app name in home screen, check android:label inside the <activity /> tag

For more information, check out the official documentation: https://developer.android.com/guide/topics/manifest/application-element

android:name The fully qualified name of an Application subclass implemented for the application. When the application process is started, this class is instantiated before any of the application's components. The subclass is optional; most applications won't need one. In the absence of a subclass, Android uses an instance of the base Application class.

android:label A user-readable label for the application as a whole, and a default label for each of the application's components. See the individual label attributes for , , , , and elements. The label should be set as a reference to a string resource, so that it can be localized like other strings in the user interface. However, as a convenience while you're developing the application, it can also be set as a raw string.

like image 148
Simon Pham Avatar answered May 17 '26 01:05

Simon Pham