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?
Asked
Active
Viewed 3,299 times
5
-
2You've got a problem. The Java language spec declares that package names are all lower case. Studio is doing it right. Eclipse is wrong. There is no way that Studio will change so you either have to stick with Eclipse or release a new app. http://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html – Simon Oct 04 '13 at 18:45
-
But the weird thing is that its not studio that is throwing the error, its the phone itself. That's the part that makes no sense. The phone has no problem with the capital letter from eclipse complied apk, but dose from studio compiled apk. – bleem313 Oct 04 '13 at 18:53
-
That's a level below my knowledge, sorry, but a package name with capital letters will always be incorrect. You are also at risk of Play or Android itself enforcing this in a future version. – Simon Oct 04 '13 at 19:00
-
@Simon: Java coding convention recommends using lower case for package names, but neither the Java language spec nor the JVM require it. – Konstantin Komissarchik Oct 04 '13 at 20:17
-
I know not to put capitals in the package name, This is an app the company I work for bought (its already on the market) and that's the package name it came with. – bleem313 Oct 11 '13 at 16:06
-
@Simon The Android package name is independent from the Java package name. They're just often the same because they follow the same conventions. – Kevin Krumwiede Aug 31 '17 at 06:10
3 Answers
1
Maybe google play is not case sensitive and thats why it doesn't recognize the upercase package name, you might be able to post an update with the same package name but lowercase. Have you tried it?

DArkO
- 15,880
- 12
- 60
- 88
-
-https://play.google.com/store/apps/details?id=com.buzzinga.App&hl=en -https://play.google.com/store/apps/details?id=com.buzzinga.app&hl=en – Gopi.cs Jun 07 '16 at 09:50
1
Had the same problem with capitals in old package name. In studio simply rename the package in build.gradle (Module:app) from com.abc.example to com.ABC.example sync the project and all should be well.

Fred Knerk
- 15
- 3
-
This won't work when you package it in a signed app and upload to google play store. – Bqin1 Aug 10 '17 at 03:43
1
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

emarv
- 21
- 2