I created a wonderful app, but I want to rename the "application name" alone... (i.e the name seen by the user on the app icon ) .. ( this isn't package renaming)
How do I do it, without creating a new one ...
In the strings.xml file, there is an element app_name which is used in the AndroidManifest's application element as the app's name. Just change the value of app_name in the strings.xml file to change the name of your app.
You don't need to refactor to change the name that people see. That is set in your res->values->Strings.xml file. You can call it what you want.
you can try Refactor -> rename.
Related
Apple have clear instructions on how to change the display name of an IOS app, but they are not useful for a react-native app because the folder structure is different. How do you change the display name if you have a react-native app?
iOS
Goto ios/<Appname>/Info.plist and edit the $(PRODUCT_NAME) to change the display name
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
Android
Goto android/app/src/main/res/values/strings.xml and edit the APP_NAME to change the name
<string name="app_name">APP_NAME</string>
for ios just add this to Info.plist
<key>CFBundleDisplayName</key>
<string>APP_NAME</string>
for android edit strings.xml file which located in res/values/
<string name="app_name">APP_NAME</string>
res -> values -> strings.xml
<string name="app_name">YOUR APP NAME HERE</string>
Change that and you will have changed your display name of the app.
Inside the manifest file, inside the application tag you will find
android:label="#string/app_name"
You can change this too, if you want to change the display name of your app.
Note: It is always recommended to have values stored in the "values" folder instead of hardcoding the values directly.
There's a file called app.json in the root of your project. Just change the "displayName" then delete ios folder and run "react-native eject".
file path : /android/app/src/main/res/values/strings.xml
replace My App with your app name.
Instead of creating an app from a template with a Display Name which needs to be changed later, it would be preferable to create the app with the desired names from the start, as I explain here in my answer. For a new app use:
npx react-native init NewcoFrameDesign --title "Newco Frame Design"
The --title option corresponds to the display name in android/app/src/main/res/values/strings.xml and ios/NewcoFrameDesign/Info.plist as well as in app.json.
I am having this issue when I am having file with name 01a.png under res/drawable.
The error looks like:
Error: The resource name must start with a letter
I am using build:gradle:2.1.2 and SDK version 24.
Any solution to fix this without changing filename and without degrading SDK version?
change the name of the resources, it MUST start with a letter
Imagname must starts with a letter so change the image name
Resources are located on the left in your Android Studio.
Project > app > res > values.. you'll find your resources there. Android studio will commonly mark the incorrect syntax with RED text
In My Case when the string key name got removed from string.xml so I got this error,
for example:
<string name="">Submit Order</string>
after putting back string key name like below, it's working fine
<string name="label_submit_order">Submit Order</string>
I am trying to set the name of my application and the name of my first activity to different values (I need trademark sign in my activity label, but not in the app name). I found this Naming my application in android and in the last comment the said if I set the app name using #string it will have affect, but it doesn't have. Is ther any way to do this?
On your onCreate()
String title = getTitle().toString();
setTitle(title + "(R)");
Being (R) the copyright symbol :)
AFAIK there is no way to achieve this in the manifest since the name attribute is used in the launcher automatically (I suggest that's what you mean with 'application name'). But you can do this in your code by simply using:
setTitle(R.string.yourActivityTitle)
-> The string in your manifest is used as "application name" and the string in your code is used for activity name.
Hope that helps...
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Package renaming in eclipse android project
Is there a easy way to change the package name of an android project? When I change it in manifest from xxx.en to xxx.zh, I need to fix all "import xxx.en.R" to "import xxx.zh.R" in every java files! plz help me, a easy way is needed.
If you are using eclipse,
3 steps:
1) change in manifest
2) select project in navigator and press clt+h. Search from string
import xxx.en.R; In search tab you will get full list of string matches.
3) Right click any of the match and select replace all , enter the replace text as "import xxx.zh.R;"
Hit enter and its done.
You can try by: right click on your project > Android Tools > Rename Application Package. I think this link is useful for you: How to change package name of an Android Application
In the manifest file, instead of the old package name, put the new package name at every location
Your classes may need direct package name references like activity android:name="com.abc.Myactivity".
Right click the package name inside the project. Select Refactor>Rename and type the desired new package name. select "update references".
Change the layout xml files with the new package name
It is very easy
Just click on package which you want to change name than press F2 key it will show warning than press ok than rename package.
com.*.**
after press F2
Com.####.*
Some users want to rename my Android app to something else.
So I'd like to provide a text field for them to put in a new name inside my app.
Then how can I programmatically rename my app name to the new name?
You want to rename your app or change the title when application is running?
To change the title you have setTtle() funcion from activity.
If you want to change application name in string.xml you should have a value called app_name.
You have to rename it to the new value.
To do so you have to unzip the apk and modify the xml file and then repack it.
But making this way I think application have to be reinstalled.