Reputation: 479
I have an old Android application I developed using the Eclipse Android Plugin, and am attempting to convert it to the new Android Studio. The automatic conversion was a miserable failure, so I converted it manually.
The issue is that now, when I run my new application, it launches as a new installation rather than replacing the old one. My guess is there's an ID somewhere that I need to copy from my old install, but I am at a complete loss as to where to find that.
One thing that may be the source of the issue is that in the old Eclipse IDE you specified the package name for your code separate from the project name. But in Android Studio, the package name is derived directly from the project name. When I originally created the project I misspelled the package name, so the package and project names aren't the same. I already have my new version of the app running under the same name and (misspelled) package name of the old one.
Upvotes: 1
Views: 42
Reputation: 93872
I think there are two things that need to match with your old application:
The package name set in the manifest. This is probably your issue because it happily installed your new app without complaining about signing identities not matching. Note that in Android Studio, the package name in the manifest doesn't actually matter, because it's overwritten by whatever package name you have put in your build.gradle file.
The signing identity. To install over another copy of the same app, it needs to be signed with the same key. When running from your IDE, it is using a debug.keystore and it most likely doesn't match the old one from Eclipse. If you really need to continue from the old installation, you can find your old debug.keystore that Eclipse was using and copy it into your new project. Modify build.gradle to point to this other debug.keystore.
Upvotes: 1
Reputation: 2085
If changing a package name is your problem it can be easily fixed.
You can perform a refactor on your package name from inside Android Studio (or change the folder name manually and update references).
Then you must check for your applicationId in your release (and debug if needed) configuration found in your build.gradle file.
Hope it helps.
Upvotes: 1