Paul Lee
Paul Lee

Reputation: 25

My app is not showing the name from the manifest file

I'm currently doing some testing on my android app, but without being plugged in by USB cable to my laptop. On my "app list" (the one you get by pressing the 3x3 grid of white dots on the bottom centre of the home screen of your phone), I can see my app - the icon is showing but the app name isn't. I've included my manifest and strings file - can anyone see what is wrong please? It doesn't seem to be taking the label tag from the application section in the manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypackage.excursions">

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />


<application
    android:allowBackup="true"
    android:icon="@drawable/custommarkerblank"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="@string/google_maps_key" />

    <activity
        android:name=".Excursions"
        android:label="">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>


</application>

</manifest>

The strings file (with the API key removed) is this:

<resources>
<string name="app_name">Excursions</string>
<string name="title_activity_excursions"></string>
</resources>

Upvotes: 0

Views: 1261

Answers (3)

Martin Zeitler
Martin Zeitler

Reputation: 76569

that label needs a string resource assigned:

android:label="@string/app_name"

or when there are several launch-able activities:

android:label="@string/title_activity_excursions"

Upvotes: 1

Gourav
Gourav

Reputation: 2819

This is beacuse the laucher activity also has no label! Try adding a label.

Upvotes: 2

Habib Mhamadi
Habib Mhamadi

Reputation: 769

Your Launcher activity has no label, try to add label for the launcher activity.

Upvotes: 1

Related Questions