Android实现OneSignal我得到找不到任何匹配错误

时间:2016-12-07 10:22:39

标签: android onesignal

在尝试为我的项目实施OneSignal时,我收到此错误:

Could not find any matches for com.google.android.gms:play-services-gcm:+ as no versions of com.google.android.gms:play-services-gcm are available.

我从SDK管理器

安装了GooglePlay服务

enter image description here

更新后:

android {     compileSdkVersion 24     buildToolsVersion" 24.0.2"     defaultConfig {

    manifestPlaceholders = [onesignal_app_id: "MY APP ID",
                            onesignal_google_project_number: "REMOTE"]

    applicationId "com.kermany.behandam"
    minSdkVersion 16
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:cardview-v7:+'
    compile 'com.jakewharton:butterknife:8.2.1'
    apt 'com.jakewharton:butterknife-compiler:8.2.1'
    compile 'com.google.code.gson:gson:2.6.2'
    compile 'com.bugsnag:bugsnag-android:+'
    compile 'com.kogitune:pre-lollipop-activity-transition:1.3.0'
    compile 'org.greenrobot:eventbus:3.0.0'
    compile 'cat.ereza:customactivityoncrash:1.5.0'
    apt "org.androidannotations:androidannotations:4.0.0"
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.android.support:design:24.2.1'
    compile 'com.makeramen:roundedimageview:2.2.1'

    compile 'com.squareup.retrofit2:retrofit:2.0.2'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'

    compile 'org.greenrobot:eventbus:3.0.0'
    compile 'com.balysv:material-ripple:1.0.2'

    compile 'com.facebook.rebound:rebound:0.3.8'
    compile 'com.bugsnag:bugsnag-android:3.+'

    compile 'com.github.hotchemi:permissionsdispatcher:2.1.3'
    apt 'com.github.hotchemi:permissionsdispatcher-processor:2.1.3'

    compile 'net.danlew:android.joda:2.9.5'
    compile 'com.jaredrummler:android-device-names:1.1.2'

    compile 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:0.6.5'

    compile 'com.onesignal:OneSignal:3.+@aar'

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

    compile 'com.google.android.gms:play-services-location:+'
}

1 个答案:

答案 0 :(得分:1)

从上面的截图中你还没有安装

  

Google Repository

安装" Google Repository"并重新启动您的工作室,这将解决您的问题。还要检查你是否有任何旧的SDK安装和一个你从工作室安装的SDK,由于冲突很久,我面临类似的问题。请看截图

enter image description here