在 Eclipse 中更改应用程序名称

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14643946/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:55:23  来源:igfitidea点击:

Changing App name in Eclipse

javaandroideclipse

提问by user896692

I′ve finished my quiz app a few days ago. Now, I want to publish a second quiz with different questions. I copied the project in Eclipse and changed the questions. Now, when install it on my smartphone, it tells me that this app is already there.

几天前我已经完成了我的测验应用程序。现在,我想发布带有不同问题的第二个测验。我在 Eclipse 中复制了项目并更改了问题。现在,当它安装在我的智能手机上时,它告诉我这个应用程序已经存在。

So where can I change the name that the two apps are different? Or do I have to change something else?

那么这两个应用程序不同的名称在哪里可以更改?还是我必须改变其他东西?

回答by Nermeen

You need to change the package name:

您需要更改包名称:

 Right click on the project -> Android Tools -> Rename Application package

回答by eclipsee

If you haven't done it yet... you need to change the package name like above but go into strings.xmland modify "<string name="app_name">your app name </string>"by changing simply the text that in this case says your app name.

如果您还没有这样做……您需要像上面一样更改包名称,但只需更改在这种情况下表示您的应用程序名称的文本即可进行strings.xml修改"<string name="app_name">your app name </string>"

回答by Siddharth Lele

When you are testing, you can make do with uninstalling one and installing the other. However, if you intend to release two applications (or any number of applications) on Google Play, you should always have different package names for each.

当您进行测试时,您可以卸载一个并安装另一个。但是,如果您打算在 Google Play 上发布两个应用程序(或任意数量的应用程序),您应该始终为每个应用程序使用不同的包名称。

The way the Google Play mechanism works is that different applications can have the same name. They are however, differentiated with their package names. No two applications on the Google Play store can share the same package names.

Google Play 机制的工作方式是不同的应用程序可以具有相同的名称。然而,它们的区别在于它们的包名。Google Play 商店中的两个应用程序不能共享相同的包名称。

Here is a nice article titled, Things That Cannot Changeby Dianne Hackborn.

这是一篇很棒的文章,标题是Dianne Hackborn无法改变事情

Of course, use this (as already answered by Nunu), to change the Package name of your second application: Right click on the project -> Android Tools -> Rename Application package

当然,使用这个(如 Nunu 已经回答的那样),更改第二个应用程序的包名称: 右键单击项目 -> Android 工具 -> 重命名应用程序包

回答by hiba

Your pakage name is same. 1. Try to uninstall older one and then re install 2. or install it by simply changing your pakage name

你的包名是一样的。1. 尝试卸载旧的,然后重新安装 2. 或通过简单地更改您的包名称来安装它

回答by Anand

You Need to change name of your main package name , here the app name should be same but package name should not !

您需要更改主包名称的名称,这里应用程序名称应该相同但包名称不应该!

回答by Ekonion

It may be in the AndroidManifest.xml -> Application. pls have a look

它可能在 AndroidManifest.xml -> 应用程序中。请看看

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

also in the XML

也在 XML 中