Reputation: 373
I made an Android application, but when I look at it in my device, the appName just disappeared whereas I added it in the manifest and strings.xml. My application is the one at the bottom left
manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.package.package.package"
android:versionCode="3"
android:versionName="2">
<application
android:allowBackup="true"
android:icon="@drawable/countdown_icono"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
// Activities
</application>
strings.xml
<resources>
<string name="app_name">I can\'t wait!</string>
</resources>
If someone could helps :)
SOLUTION :
<activity
android:name=".MainActivity"
android:label="APP NAME" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Upvotes: 2
Views: 846
Reputation: 3257
You probably need to add
android:label="@string/app_name"
inside your Activity tag in the AndroidManifest.xml.
<activity android:name=".theJavaClassActivity"
android:label="yourString">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Android Launcher shows the title of the activity that has the Intent-filter
of android.intent.action.MAIN
. In this way it is able to show more than one activity icons and titles if your application requires so.
Upvotes: 1