0

a couple months ago I reinstalled my OS (Linux Mint). I put the files into another partition and then copied them back. After that, my apps didn’t install properly anymore. I had to uninstall and then reinstall my app. I used an APK, not the Play Store. I want to switch my OS again, but I don’t want to break my app, so can anyone explain what happened and how to prevent it?

Thanks

Lasslos05
  • 414
  • 2
  • 12
  • You probably signed with a different debug key. Saving the key and restoring it when you reinstall would fix that. https://stackoverflow.com/questions/16965058/where-is-debug-keystore-in-android-studio describes how to find the file – Gabe Sechan Dec 21 '21 at 18:11
  • Yeah, that was exactly what I was looking for. Follow Up Question: Do I only have to save debug.keystore? There is a ton of other files that seem kinda important, like abdkey, debug.keystore.lock. Also, I read here https://developer.android.com/studio/publish/app-signing#debug-mode that the key is used for debug mode, even though I am building my Flutter App with flutter build apk --release which uses release mode. Does it still use debug.keystore or is there a different file? – Lasslos05 Dec 23 '21 at 00:55
  • If you're building with a release key, then the app needs to be signed by that. The important part is that whatever key you use, it needs to remain unchanged. – Gabe Sechan Dec 23 '21 at 21:43
  • I figured it out, thanks. – Lasslos05 Dec 25 '21 at 00:39

1 Answers1

0

The solution is to save the debug key, which can be found like described in this question: Where is debug.keystore in Android Studio. After the installation of the Android SDK on the new OS, replace the debug key with your old one. The key is not in you project files, that's why it isn't enough to copy the project files. On long term, one should add a release key to the app to reduce confusion.

Lasslos05
  • 414
  • 2
  • 12