Awareness API需要哪种依赖关系?

rek*_*ire 3 android google-awareness

我想查看新的Awareness API,这是一个非常新的.我正在使用Play Services 9.0.2.该文档有这个例子:

GoogleApiClient client = new GoogleApiClient.Builder(context)
        .addApi(Awareness.API)
        .build();
client.connect();
Run Code Online (Sandbox Code Playgroud)

但是,没有提示需要添加哪些依赖项.任何的想法?

rek*_*ire 6

我发现了:我需要升级到PlayServices 9.2.0并隐藏依赖项play-services-contextmanager.只需添加这些依赖项,我们就在这里:

compile 'com.google.android.gms:play-services-awareness:10.2.4'
Run Code Online (Sandbox Code Playgroud)

请使用最新的播放服务库,当时我更新了这个答案,它是10.2.4

如果您想了解最新的Dependency,可以使用我的名为DependencyLookup的 Web工具.

请记住,此库已添加到Play Services Repository v31中.确保您在SDK管理器中至少安装了该版本.