Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安卓apk加固后,无法获取位置信息,已授权了 #138

Closed
orzhtml opened this issue Feb 26, 2021 · 3 comments
Closed

安卓apk加固后,无法获取位置信息,已授权了 #138

orzhtml opened this issue Feb 26, 2021 · 3 comments

Comments

@orzhtml
Copy link

orzhtml commented Feb 26, 2021

安卓apk加固后,无法获取位置信息,已授权了,位置信息也开启了,直接到系统里面查看授权信息也是完全授权。苹果正常。

@orzhtml
Copy link
Author

orzhtml commented Feb 26, 2021

安卓apk未加固的情况下,位置授权,获取,都正常获取位置信息

@orzhtml
Copy link
Author

orzhtml commented Feb 26, 2021

版本:"react-native-amap-geolocation": "^1.1.2"

@orzhtml
Copy link
Author

orzhtml commented Feb 26, 2021

问题找到了,加固后 SHA1 不一致了,需要这样操作:
使用解压工具将apk文件解压,得到 META-INF/你的apk前面文件.RSA 文件,然后使用keytool命令查看签名信息

命令:keytool -printcert -file META-INF/你的apk前面文件.RSA (mac的话直接拖拽文件进去完整路径) 回车
就会显示对应的 SHA1 相关信息

@orzhtml orzhtml closed this as completed Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant