Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android &引用;Google Play服务正在更新;处于释放模式时SupportMapFragment中的消息_Android_Google Maps_Google Play Services - Fatal编程技术网

Android &引用;Google Play服务正在更新;处于释放模式时SupportMapFragment中的消息

Android &引用;Google Play服务正在更新;处于释放模式时SupportMapFragment中的消息,android,google-maps,google-play-services,Android,Google Maps,Google Play Services,我对谷歌地图有一个奇怪的问题 当我处于调试模式时,一切正常,但当我处于发布模式时,不会调用onMapReady回调,地图显示“Google Play服务正在更新”消息 另一件奇怪的事情是,如果我在应用程序中运行一个活动,从一个映射开始,它就可以工作,即使在其他活动中也是如此 这是我在片段中的代码 @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sav

我对谷歌地图有一个奇怪的问题

当我处于调试模式时,一切正常,但当我处于发布模式时,不会调用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;
}

将我所有的google play依赖项降级到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'

尝试将此行添加到proguard规则文件中

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

希望有帮助

你知道为什么会这样吗?我面临着完全相同的问题。谢谢,不幸的是我没有。只有当我在第一个活动(启动器活动)中加载了一个假的地图时,它才能在发布模式下工作。可能有一些与其他玩家相关的bug,他们现在面临着同样的问题!这方面有什么消息吗?不幸的是,我仍在使用10.0.1版本,甚至降级到9.6.0或9.8.0在禁用proguard的那一刻都不起作用,因此这不是proguard相关的问题。