无法解析:com.google.android.gms:play-services-gcm:7.5。+ [英] Failed to resolve: com.google.android.gms:play-services-gcm:7.5.+

查看:501
本文介绍了无法解析:com.google.android.gms:play-services-gcm:7.5。+的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我一直收到这个错误信息:



解决失败:com.google.android.gms:play-services-gcm:7.5。+ |
安装存储库并同步项目|在项目结构对话框中显示


如果我尝试安装Repository并同步项目,则会出现以下错误:



加载SDK信息...
忽略未知的包过滤器'extra-google-m2repository'警告:包过滤器删除了所有包。没有什么可安装的。
请考虑在没有包过滤器的情况下再次尝试更新。



这是我的gradle file:

  apply plugin:'com.android.application'
apply plugin:'com.google.gms。 google-services'
$ b $ android {{b $ b compileSdkVersion 22
buildToolsVersion22.0.1
...

依赖关系{
编译fileTree(dir:'libs',include:['* .jar'])
编译'com.android.support:appcompat-v7:22.2.1'
编译'com.google。 android.gms:play-services-gcm:7.5。+'

//顶层构建文件您可以在其中添加对所有子项目/模块通用的配置选项。

  buildscript {
repositories {
jcenter()
}
依赖关系{
classpath'com.android.tools.build:gradle:1.2.3'
classpath'com.google.gms:go ogle-services:1.3+'

//注意:不要在这里放置您的应用程序依赖项;它们属于单个模块build.gradle文件中的
//
}
}

allprojects {
存储库{
jcenter()
}
}


解决方案

你能请检查 Android SDK管理器中的 必需软件包 是否是最新的。



并使用

  compile'c​​om.google.android.gms: play-services-gcm:7.5.0'

我希望它能帮助你。


I am trying to include GCM in my app.

I keep getting this error message :

Failed to resolve: com.google.android.gms:play-services-gcm:7.5.+ | Install Repository and sync project | Show in Project Structure dialog

If I try to Install Repository and sync project i get this error:

Loading SDK information... Ignoring unknown package filter 'extra-google-m2repository'Warning: The package filter removed all packages. There is nothing to install. Please consider trying to update again without a package filter.

Here is my gradle file:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    ...

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:22.2.1'
        compile 'com.google.android.gms:play-services-gcm:7.5.+'

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
        classpath 'com.google.gms:google-services:1.3+'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

解决方案

Could you check that the necessary packages in your Android SDK Manager are up to date.

And use

compile 'com.google.android.gms:play-services-gcm:7.5.0'

I hope it will helps you .

这篇关于无法解析:com.google.android.gms:play-services-gcm:7.5。+的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆