Joo*_*lah 11 java notifications android google-cloud-messaging
我想在我的应用程序中包含GCM.
我一直收到此错误消息:
无法解决:com.google.android.gms:play-services-gcm:7.5.+ | 安装存储库和同步项目| 在Project Structure对话框中显示
如果我尝试安装存储库和同步项目,我会收到此错误:
加载SDK信息...忽略未知的包过滤器'extra-google-m2repository'警告:包过滤器删除了所有包.没有什么可以安装的.请考虑在没有包过滤器的情况下再次尝试更新.
这是我的gradle文件:
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.+'
Run Code Online (Sandbox Code Playgroud)
//顶级构建文件,您可以在其中添加所有子项目/模块共有的配置选项.
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()
}
}
Run Code Online (Sandbox Code Playgroud)
Int*_*iya 11
你可以检查必需的包在你的Android SDK Manager are up to date.
并使用
compile 'com.google.android.gms:play-services-gcm:7.5.0'
Run Code Online (Sandbox Code Playgroud)
我希望它会对你有所帮助.