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">
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.