Android Question switched key file?

leitor79

Active Member
Licensed User
Longtime User
Hi!

Yesterday I was working with a b4a project that uses the google maps API, debugging with my phone. So far so good; then I've shut down my PC and went to sleep. I have other open projects which I used for reference (copying and pasting code). I've closed them all with a right click on the taskbar button -> close.

Today, I open the project in b4a and the b4a bridge, connect the project to it, change some code, run the app again (debug mode), it tries to install into the phone but I get an error: the package name conflicts with an already installed package. I manually uninstall the app, then run again and now it works.

BUT, I can't see the map (yesterday I could). So, after checking some stuff, I realize that the SHA-1 key defined in the restrictions of the API credential for google maps is different from the one that I get in the "private sign key" window in b4a. So, I've set this "new" key in my google maps credential restriction and it works again.

BUT, as I'm writing this I get curious about how that key can be different with the same file, and then went to check something to that window and, I'm not sure how, I notice that the key file loaded there is not the one from my project, is from one of the other projects I had open last night (I didn't realized at first because the path is too long). The password set in that window was also the one from the other project.

I'm sure I didn't changed any of this last night; I didn't change the key file or it configuration since yesterday morning when I put this to work...

Regards,
 

leitor79

Active Member
Licensed User
Longtime User
Hi Erel, thank you for your response.

I've changed the SHA key in the google console because I've detected it was different. It turned out to be different because the key file of the project had changed and I didn't noticed at first (the path is too long and the key file name is not visible)

The key didn't switched to the debug key, it was the key file for one of the others projects I had opened; both key files are in the same folder (just the keys, not the project). After switching to the right key, I also had to re-set the password, which it was the one from the other project/key too.

I know this was changed because It worked the night before but yesterday I got:
- package name conflict at install
- google maps didn't work because the wrong sha key


Regards,
 

Attachments

  • 2018-12-13_10-43-55.png
    2018-12-13_10-43-55.png
    23.2 KB · Views: 148
Upvote 0
Top