2016-12-07 19 views
0

当尽力为我的项目实施OneSignal我得到这个错误:Android的实施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:[email protected]' 

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

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

它在我的代码可以工作正常,你可以张贴的依赖标记从你的build.gradle – Swapnil

+0

@Swapnil是的,我添加了一些其他的gradle依赖 –

+0

@Swapnil你能看到我的更新后?谢谢 –

回答

1

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

Google Repository

安装 “谷歌库”,然后重新启动你的工作室,这将解决您的问题。还要检查,如果你有你的工作室安装任何旧的安装SDK和一个,我面临着同样的问题,由于冲突长期back.Please见截图

enter image description here

+0

谢谢先生,问题已解决 –