【问题标题】:Native Google maps not working原生谷歌地图不起作用
【发布时间】:2016-01-18 03:05:37
【问题描述】:

我已经尝试过原生谷歌地图,它在设备上的外观是这样的,只有谷歌徽标但没有显示地图 enter image description here

【问题讨论】:

    标签: codenameone


    【解决方案1】:

    这是由于使用了无效的 API 密钥。您需要检查您是否按照正确生成密钥的每个步骤进行操作。

    • 在项目属性中创建您的应用程序 android 密钥库。
    • 生成 SHA1 密钥
    • 复制密钥和您的应用标识符并将它们粘贴到您的 Google 控制台中,用分号分隔 2。
    • 同时创建 android 和 iOS 密钥。
    • 在构建提示中添加 2,如下所示:

      android.xapplication=<meta-data     android:name="com.google.android.maps.v2.API_KEY"     android:value="Your_Key_Inside_these_double_quotes"/>
      android.xpermissions=<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/><uses-feature         android:glEsVersion="0x00020000"         android:required="true"/>
      
      ios.add_libs=libc++.dylib;libicucore.dylib;libz.dylib;CoreData.framework;CoreText.framework;GLKit.framework;ImageIO.framework;SystemConfiguration.framework
      ios.glAppDelegateHeader=#import "GoogleMaps.h
      ios.afterFinishLaunching=[GMSServices provideAPIKey:@"Your_Key_Inside_these_double_quotes"];
      

    此外,您还需要打开 Google Map API,这实际上可能是问题所在...

    【讨论】:

    • 我做了所有的步骤,仍然是同样的问题
    • 我遇到了完全相同的问题。 logcat 似乎也表明一切正常。没有错误消息,只有“阻止创建...”、“Google Play 服务包版本...”、“已完成阻止...”
    • 最后这是一个 API 密钥问题,我已经为我的密钥库加载了我的签名,但它当然无法识别来自调试版本的签名。
    猜你喜欢
    • 2018-04-29
    • 2020-02-20
    • 2013-09-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-12
    相关资源
    最近更新 更多