2017-02-24 73 views
5

我对GoogleMaps有这个奇怪的问题。在发布模式下,SupportMap中的“Google Play服务正在更新”消息

当我处于调试模式时,一切正常,但是当我处于发布模式时,onmapReady回调从不会被调用,并且地图显示“Google Play服务正在更新”消息。

另一个奇怪的是,如果我在应用程序开始时运行一个活动,它可以工作,即使在其他活动中。

这是我在片段

@Nullable 
@Override 
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 

    FrameLayout fr = (FrameLayout) inflater.inflate(R.layout.my_fragment, null); 
    //views code 

    SupportMapFragment mapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map); 
    mapFragment.getMapAsync(this); 

    return fr; 
} 
+0

你弄清楚这是为什么hapenning?我面临着完全相同的问题。谢谢。 – MLN

+0

不幸我不知道。只有当我在第一个活动(启动器活动)中加载虚假地图时,它才能在发布模式下运行。也许有一些错误与其他玩服务的东西有关 – Bronx

+0

现在面临同样的问题!有关这方面的消息吗? – Chris

回答

0

降级为我工作我所有的谷歌播放依赖于10.0.1代码。看到如下:

compile 'com.google.android.gms:play-services:10.0.1' 
compile 'com.google.android.gms:play-services-places:10.0.1' 
compile 'com.google.android.gms:play-services-analytics:10.0.1' 
compile 'com.google.firebase:firebase-crash:10.0.1' 
+0

不幸的是,我仍然使用10.0.1版本,甚至降级到9.6.0或9.8.0不起作用 – Bronx

0

尝试加入这行来ProGuard的规则文件

-keep class com.google. ** {*; } 

希望它可以帮助

+0

目前,proguard已禁用,因此它不是一个与proguard相关的问题。 – Bronx

相关问题