0

I'm using the xml string and which comes by default "app_name" in the android, but when I use it shows me wrong, it shows me the package name.

This is my definition in the code:

<string name="app_name">App's Name</string>

And in the Manifest.xml:

<application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:theme="@style/AppTheme" >

But in the Android show me the app name how "br.com.enterprise.app"

(I can't post image because this is my first post)

A another thing that happens is when I install the app in another smartphone it show a error message and close, I think that the cause is from the same reason.

2
  • 2
    What does this android:label="something" in your activity refer to? Commented Apr 23, 2015 at 12:24
  • I have not seen this mistake! thanks Commented Apr 23, 2015 at 12:36

2 Answers 2

3

You need to refer the app name in application tag like this,

<application
    android:allowBackup="true"
    android:label="@string/app_name"
    android:icon="@drawable/ic_launcher"
    android:theme="@style/AppTheme" >

Thanks!

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks! I was blind, I lost 2 days with this!
Ok Welcome!! You can also add the android:label in your launcher activity also...Please accept my answer and upvote it!!
0

To fix the app's name problem, add the Label property to link the String app_name to the application's name.

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:theme="@style/AppTheme"
    android:label="@string/app_name">

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.