为什么Android Studio在使用大写的软件包名称时会遇到问题? [英] Why is Android studio having problems with capitalized package names?

查看:361
本文介绍了为什么Android Studio在使用大写的软件包名称时会遇到问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在eclipse中启动的应用程序.软件包名称以大写字母开头,并且始终正确进行编译和安装.现在,我已将项目移至android studio中,尽管该应用程序将编译,但由于清单格式错误,因此无法安装.我查了一下这个问题,建议是小写包名.这个剂量解决了问题,并安装了应用程序,但这没有任何意义.为什么用eclipse编译的应用程序可以很好用,但是Android Studio中的相同代码不起作用?这是一个很大的问题,因为该应用程序已经在Play商店中,并且我不能小写包名称,所以我陷入了eclipse中.有人知道可以解决吗?

I have an app that started in eclipse. The package name starts with a capital, and it always compiled and installed correctly. Now that I have moved the project into android studio, while the app will compile, it won't install due to a malformed manifest. I looked up this problem, and the suggestion was to lowercase the package name. This dose solve the problem, and the app installs, but this makes no sense. Why would apps compiled in eclipse be fine with it, but the same code in Android Studio not work? This is a large problem, as the app is already in the play store, and I can't lowercase the package name, so I'm stuck in eclipse. Dose anyone know a work around?

推荐答案

在Android Studio中重命名包名称,并在build.gradle中保留旧的applicationId. 尽管默认情况下项目的程序包名称与应用程序ID匹配,但是您可以对其进行更改.您永远不要更改应用程序ID. 更多: https://developer.android.com/studio/build/application-id.html#change_the.package_name

In Android Studio rename the package name and in build.gradle leave old applicationId. Although your project's package name matches the application ID by default, you can change it. You should never change the application ID. More: https://developer.android.com/studio/build/application-id.html#change_the.package_name

这篇关于为什么Android Studio在使用大写的软件包名称时会遇到问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆