Mapview 在印度工作但在瑞士不行
我正在制作一个Android应用程序,其中我使用谷歌地图,该地图在印度运行良好,但相同的构建在瑞士不起作用,即在瑞士,地图未加载。 在生成 google api 密钥或 debug.keystore 时是否有特定于国家或地区的内容。
I am making an android app in which i am using google maps which are working perfectly in India but the same build is not working in Switzerland i.e. in switzerland the maps are not loading in.
Is ther anything that is country orregion specific in generating google api key or debug.keystore.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不会。默认情况下,
debug.keystore
是特定于开发人员的。因此,Google 地图 API 密钥是特定于开发人员的。地理与此无关。如果这两个设备使用的是同一个 APK 文件,则可能是:
前两个应该可由用户测试(例如,尝试打开本机地图应用程序或浏览器)。最后一个应该可以通过让用户往窗外看来进行测试。 :-)
但是,如果 APK 文件是由印度的一名开发人员构建的,而另一个 APK 文件是由瑞士的开发人员构建的,并且该应用程序在印度运行,那么瑞士开发人员需要提供他或她自己的地图将 API 密钥添加到源代码中,或使用与印度开发人员所使用的相同的
debug.keystore
。No. The
debug.keystore
, by default, is developer-specific. Hence, the Google Map API key is developer-specific. Geography has nothing to do with it.If this is the same exact APK file being used by both devices, then either:
The first two should be testable by the user (e.g., try opening the native Maps application or browser). The last one should be testable by having the user look out a window. :-)
If, however, the APK file was built by one developer in India and a different APK file was built by a developer in Switzerland, and the app is working in India, then the Swiss developer needs to supply his or her own Maps API key into the source code, or use the same
debug.keystore
as is being used by the developer from India.