简体   繁体   English

辞职的apk后Google地图不起作用

[英]Google maps does not work after resigning an apk

I am doing some modification in an existing apk that i got from my client to modify. 我正在从客户那里进行修改的现有apk中进行一些修改。 I have decompiled application using apktool, changed some resources (like some strings from strings.xml ) and recompiled/built it again using same tool. 我已经使用apktool反编译了应用程序,更改了一些资源(例如strings.xml一些字符串),并使用相同的工具再次对其进行了编译/构建。 Then I signed using one_click_signer tool that I found somewhere of the google. 然后,我使用在Google某处找到的one_click_signer工具进行了签名。

But when I install it on my device then google maps does not work anymore as it was working with original apk on the same device. 但是,当我将其安装在我的设备上时,谷歌地图不再起作用,因为它正在同一台设备上使用原始apk。

I have searched a lot about this but did not got any solution. 我对此进行了很多搜索,但没有任何解决方案。 I reviewed this link and many more and come to conclusion that I need to sign the apk with same key that was in original apk. 我查看了此链接以及更多内容,并得出结论,我需要使用与原始apk相同的密钥对apk进行签名。

So can anyone please tell me: 所以任何人都可以告诉我:

  1. how can I sign the apk again with the same key and make map work? 如何使用相同的密钥再次对apk进行签名并使地图正常工作?
  2. or is there any other way to make maps work properly? 还是有其他方法可以使地图正常工作?

Solution That I found and worked for me: 我找到并为我工作的解决方案:

Thanx for @apmartin1991's answer . 感谢@ apmartin1991的回答。 .

I created a google api console project and got got the generated key. 我创建了一个Google api控制台项目,并获得了生成的密钥。 then I replaced that key in android-manifest.xml file and resigned the application. 然后我将密钥替换为android-manifest.xml文件,并退出了应用程序。

It worked. 有效。

You will need to contact your client to get the .keystore file so you can sign it with the same key OR you can sign it with your own key and allow your key to be used with google maps, You can do this from the Google API console. 您需要与您的客户联系以获取.keystore文件,以便您可以使用相同的密钥对其进行签名,也可以使用自己的密钥对其进行签名,并允许您的密钥与Google Maps一起使用。您可以通过Google API进行此操作安慰。

However if your clients app is on the appstore and you want to update that you MUST use the same key or it will be impossible to update it. 但是,如果您的客户应用程序位于应用商店中,并且您要更新,则必须使用相同的密钥,否则将无法更新。

You need .keystore file to use the same key. 您需要.keystore文件才能使用相同的密钥。 If you dont have .keystore file you need to generate a new one and register a new key in google maps console. 如果您没有.keystore文件,则需要生成一个新文件并在Google Maps Console中注册一个新密钥。

You have all the official instructions here . 在这里有所有的官方说明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM