How to avoid android signature problem when developing from two workspaces - android

I am developing an app from two different workspace on two different PCs.
Code is shared with git.
Problem is - when I build an install the apk on my mobile (htc one m8) PC 1 and then continue on PC 2, deploy the apk, I cannot install it on this same mobile. I get an error that says that an app in with the same package alreasdy is installed, but the signatures do not match.
I could certainly uninstall the app, then reinstall - but since I use databases, the uninstall would erase that data.
Is there a way to use the same signature on both PCs?
I use Eclipse with ADT and GenyMotion.

You can use the same signature on multiple computers by copying the debug signing key between the computers (or including it in source control).
You can then set Eclipse to use that keystore for debug builds by opening the Preferences > Android > Build menu.

Related

How to move android project to another pc?

i want to move my android studio project to another pc but when im moving files from pc one to pc two and i'm trying to run the same app it's not launching and asking to remove old(the same package) app, but i want to save app signature how can i do it? for example i want to work at home, after i'm going to work and continue my project at work is it possible and how? and yes, sorry for my bad english...
image
but i want to save app signature how can i do it?
Each Android Studio installation will generate its own debug keystore for signing a debug apk. Quoting from the documentation on app signing:
"The first time you run or debug your project in Android Studio, the IDE automatically creates the debug keystore and certificate in $HOME/.android/debug.keystore, and sets the keystore and key passwords."
Apps signed with a different debug key are perceived to be different apps. So you need to copy one of the debug keystores to the $HOME/.android/ folder on the other development machine.
Download GitHub desktop and sign up. Then create repository and push project in repository. At the work in Android Studio go to File -> New -> Import Project and past a link to created repository.
https://desktop.github.com/
To see how to transfer the debug.keystore that is required so you don't get the message "The device already has an application with the same application but a different signature. In order to proceed you will have to uninstall the existing application." (and lose your data). See Update the app in another machine with same debug.keystore in android

Javafxports and Gluon charm - How to generate apk without connecting an Android to PC

I have tested an Android application by connecting my PC to my smartphone ARCHOS Diamond. With Eclipse, from Java program including JavaFX, I can generate an .apk file by executing the install Gradle task.
But, this .apk is dedicated to my phone
Now, I want to spread my application on other Android phones. But I don't want to get as many kinds of phones for generating their .apk.
How can I do to generate .apk dedicated to HW and Android versions, without having these phones?
And, if it possible to generate them, how to be sure that these apk work fine?
Thanks
If you are using the Eclipse plugin.
Right click on the project > Android Tools > Export Signed Application Package
Follow the instructions for creating a .keystore file and you're sorted!

Obtain generated debug key/certificate for developing on different machines

I'm using Eclipse to develop an app and I have two computers (a desktop and laptop) that I want to use to develop this app. I recently set up my laptop with Eclipse and imported the project over to that computer. However, I realized that I can't launch the application from my laptop onto my phone because the signature that is automatically generated when I build the app from my desktop doesn't match the one that is automatically generated on the laptop; unless I uninstall it on the phone. Does anyone know how to export the automatically generated signature from one Eclipse and import it into another?
Window -> Preferences |-> Android -> Build:
refer to your custom debug key store, (I copied mine from the C:\Users\${UserName}.android\debug.keystore) which I would put in something like drop box.
The automatically generated key is called the debug key/certificate.
You should generate a new key can just copy it over to both your devices. The only negative of this is your builds process is longer as you need a manual steps.
The other option is to copy over the debug key from one of the systems.
You will find the keys in a folder names .android in your home directory in Linux & user directory in Windows
Tip: Never loose the certificate once you push an app to the market.

Eclipse ADT: how to build the same debuggable app on two PCs with the same certificate?

Is it possible to tell Eclipse to automatically sign debug APKs with the same key, so that many PCs can be set up to use that same key? If two programmers are developing the same app and test it on the same device, they have to uninstall the app every time they pass the device to each other. Quite annoying.
Yes just use a custom key.store and keep it in your project svn.
Then in Preferences > Android > Build > Custom debug Keystore
link to it there:
For Ant build's it's a bit more complex and you have to then copy the same debug.keystore into ./android/ on both machines.
./android is usually in your user directory on mac
./android is usually in documents and settings / your username / my documents on Windows

Android - Issue with .apk file

I do understand that a .apk file is created in the bin folder of an android project, when the project is run.
I have a question about this: is it possible that there would be any difference in the functionality of an app installed via eclipse (as in connecting the phone to the computer and uploading and installing the app on the phone) versus installing the app by downloading a .apk placed on a secure server?
The reason I ask this question is that I usually put up the .apk file on a secure server and the testing team downloads and installs the app for testing purposes. The testing team has started to report app crashes when accessing this app. However, I don't seem to be seeing the any such problems (even while replicating the same scenarios) with the app when I install it on the phone via a cable connected to the computer.
You might be falling into a caching issue. Make sure you get the QA team a new filename of the apk on the server to ensure that they never get a cached apk when downloading it. Also maybe create a md5 sum of the apk locally and run md5 on the apk on the server after upload to ensure it is the same.
e.g. use
md5 yourapk.apk > yourapk.md5
on your machine and the server..
Most likely you QA team has found issues that are specific to the device or Android platform version they test with. Try with your apk with the same hardware in your dev environment.
I don't see how that would possible. The Eclipse ADT plugin just calls the executables in the specified Android SDK location on your hard drive and the .apk gets generated only once when you use Eclipse to install the application to your plugged phone.
Unless you're packaging the two versions in a different way, that shouldn't be possible. My guess is that your testing team has just found bugs specific to the runtime environment (the phone). Maybe a different version of Android, conflicting custom ROM, etc.
No, there is no difference , if the apk on the secure server is as latest as you have on your computer.
I would recommend you to clean your project before uploading the apk to the server.
Regarding the crashes, i guess there are some location based problems.
Also check if you are uploading the apk from your workspace. or some other older version which is located in different place that you are not using anymore.

Categories

Resources