Same project but another Android Studio, app not installed - android

I wrote an android app that works fine, but when copy the project and open from another android studio by the exact sdk & same app Id and try to debug; android studio wants to uninstall the last app i install from first Android Studio.
How to prevent uninstalling the existing app and just update that.

That's because all systems have different debug(auto generated) signing keys. if you don't want to unintsall app installed by another system, you have to make sure both are using same debug.keystore. so just copy paste the debug.keystore from one system to another and you're good to go.
Its location for mac/Linux is:
~/.android/debug.keystore
and windows is
C:\Users\<Username>\.android\debug.keystore

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

Visual Studio Mac, Android release signed is older than current build

I'm using Visual Studio mac for developing Xamarin, recently I released my Android app but a rare behave happened! Releasing app popped out 2 files named app.apk and app-Signed.apk and I think the 2nd one should be the one I should upload to Google Play store (am I right?), but after opening it on my device I found out many changes that was appearing in debug app are not exist in Singned one! while app.apk is OK with changes I applied to app.
Is app.apk in debug mode?
What should be app-Signed.apk and why it has this problem and how can I fix it (if answer to #1 is true)?
Sometimes Visual Studio Mac for some reason does that. Remove obj and bin folder from a project directory, and then build again. If that happens again (2 files) the odd thing that you need to upload to google play non signed one.

Can't deploy with debug.keystore from another machine

I've switched from android studio to xamarin for an application (game) I've already configured in google play developer console. I've copied and pasted the debug.keystore to C:\Users\my profile\AppData\Local\Xamarin\Mono for Android\ and cleaned the solution (I'm on visual studio 2015). The solution builds fine but the application is never installed to my Genymotion device. I see the following:
Android application is debugging. The application could not be
started. Ensure that the application has been installed to the target
device and has a launchable activity (MainLauncher = true).
Additionally, check Build->Configuration Manager to ensure this
project is set to Deploy for this configuration.
When i revert to the old keystore, clean, and build/deploy it works again. How do I fix this?
I've found that when the keystore changes, you have to follow a different uninstall process. Try uninstalling the app through the Application Manager. Depending on your version of Android, it's usually somewhere in Settings -> Applications -> Application Manager -> Find the app in the list, select it, uninstall.
For some reason, just using the trash icon to uninstall the app doesn't seem to remove the code signing information. But if you use the Application manager to uninstall, that will remove the code signing information. Then you can build and deploy with a different keystore.

Why the APK file created by Android Studio is different from APK created by Eclipse?

I have developed an Android application in Eclipse and used the APK generated by Eclipse, now I have moved to Android Studio as it is Official IDE for Android development. I have imported the project in Android Studio and got the APK file.
The problem is if I install the new APK (Generated by Android Studio) in my device that has the old APK(Generated by Eclipse) installed on it, then device is showing a message "An existing package by same name with a conflicting signature is already installed".
My Question is why both APK files are different if both is developed and generated from same PC?
Android studio is having gradle feature which builds apk a way different than the eclipse thats why different signature .
I assume you have two Android SDKs on your PC which means you may have two different default keystore on your PC (Or maybe you reinstalled your SDK so the default keystore is changed).
You can find your keystore at here:
OS X and Linux: ~/.android/
Windows Vista and Windows 7: C:\Users\your_user_name\.android\
This problem won't happen if you generate a specific keystore for your application. Later no matter which PC you use, the generated APK can always overwrite the previous version (means previous version are signed by the same keystore, and the version code is smaller).

Android - Install signed apk via Eclipse

Good day.
I have an application and I recently wrote a code to make it update programatically by fetching the updated apk file on a server I host. I made the updated apk by changing the version code to version 2 and version name to 1.0.1 in the Android Manifest file. I also placed a textView in the first activity to know if it is the updated application or not. However, an issue I encountered while updating is that I get the An existing package by the same name with a conflicting signature is already installed error when Android tries to install the downloaded apk file. Since the error is about a conflicting signature, I guessed that whenever I install an application to my device (Nexus 7) from Eclipse, the application is not signed. What I did was that I Exported a signed copy of the version 1 of the application, moved it to my Nexus 7, and installed. From that signed application version, I tried to update and I encountered no problems.
However, this process is not efficient at all because if I want to debug my application to see if data stored like the database or sharedPreferences persist between app updates, what I'll have to do is to export my app, copy to tablet, then install. This does not allow me to use logCat efficiently - as the session filter won't work. The only way for me to see my logs is via the All Messages category and look for my tags.
So, my main question is: Is there a way to install a signed copy of your application via Eclipse so you can still debug efficiently via LogCat?
A secondary question: What happens to the private app data like the SQLite Database and the SharedPreferences when the application upgrades versions? Are they deleted?
When you debug (or run) Android will use the default store key for signing your application, and you can change it on Windows -> Preferences -> Android -> Build
Change your debug keystore there with custom debug keystore
Yes Its possible to install signed copy your application via Eclipse and you can still debug efficiently via LogCat.
Follow These steps.
1. Right click on your project from project list in eclipse.
2. Click Export.
3. Then select Export Android Application
4. Then select the project to export.
5. Click Next.
6. Then give the path of signing key (Keystore file). If you don't have any then create new keystore file by selecting Create new Keystore radio button on that Dialog.
7. Enter and confirm password and click Next.
8. Select Alias of Keystore file. which you have given while creating that file.
9. Enter password for that Alias and click Next.
10. Select the destination to export apk file and click finish.
It may take few minutes to build your app. Time depends on your application size.

Categories

Resources