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

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

问题描述

我有一个在 Eclipse 中启动的应用程序.软件包名称以大写字母开头,并且始终正确编译和安装.现在我已将项目移至 android studio,虽然应用程序将编译,但由于清单格式错误,它不会安装.我查了这个问题,建议将包名小写.这个剂量解决了问题,并且应用程序安装了,但这没有任何意义.为什么在 eclipse 中编译的应用程序可以使用它,但 Android Studio 中的相同代码不起作用?这是一个大问题,因为该应用程序已经在 play store 中,并且我无法将包名小写,所以我被困在 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天全站免登陆