2016-12-07 101 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

謝謝先生,問題已解決 –