android 如何从我的Flutter应用中删除这行应用名称?

nhn9ugyo  于 12个月前  发布在  Android
关注(0)|答案(1)|浏览(73)

在我的Flutter应用程序中,不知何故出现了一行应用程序名称,不知道为什么。我如何删除它?screenshot here(我使用VS Code,Android Studio的模拟器)
我试图对appbar做些什么,但这不是问题所在。这行代码会出现在每个屏幕上,即使根本没有appbar。edit.:我发布了清单。

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<application
    android:label="appname"
    android:name="${applicationName}"
    android:icon="@mipmap/ic_launcher">
    
    <activity
        android:name=".MainActivity"
        android:exported="true"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize"
        android:screenOrientation="portrait">
        <!-- Specifies an Android theme to apply to this Activity as soon as
             the Android process has started. This theme is visible to the user
             while the Flutter UI initializes. After that, this theme continues
             to determine the Window background behind the Flutter UI. -->
        <meta-data
          android:name="io.flutter.embedding.android.NormalTheme"
          android:resource="@style/NormalTheme"
          />
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    <!-- Don't delete the meta-data below.
         This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
    <meta-data
        android:name="flutterEmbedding"
        android:value="2"/>
</application>

字符串

tv6aics1

tv6aics11#

所以,在与BingAI交谈了30分钟后,我发现了这个错误;所以我不得不覆盖这个主题,并添加一个标签。

android:label=""
 android:theme="@android:style/Theme.NoTitleBar"

字符串

相关问题