Reputation: 469
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">
Upvotes: 8
Views: 7866
Reputation: 126
android:name -> this specifies the class name (kotlin/java) which is implementing this component.
android:label -> this specifies the value that is presented to the user when they are using that component or when this component is listed in other application.
Upvotes: 0
Reputation: 408
android:name this is a class which will wxecute first time (this is not your app name ,this is a functional thing) and android:label this is name of app shown on icon which represent the app name
Upvotes: 4
Reputation: 2023
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.
Upvotes: 10
Reputation: 31
The android documentation states the following and you may find the list of attributes here
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.
Upvotes: 0
Reputation: 419
According to 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.
Upvotes: 1
Reputation: 411
android name is the name of the package that you are defining for that project and android label is the default name for your application
Upvotes: -1