为什么 Android studio 有大写包名的问题? [英] Why is Android studio having problems with capitalized package names?

查看:35
本文介绍了为什么 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天全站免登陆