2016-09-16 4 views
-1

私はいくつかの指示に従っており、このエラーが発生します。アンドロイドアプリに広告を追加できない

Error:Could not find com.google.gms:google-services:3.0.0. Searched in the following locations: file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/google/gms/google-services/3.0.0/google-services-3.0.0.jar https://maven.fabric.io/public/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom https://maven.fabric.io/public/com/google/gms/google-services/3.0.0/google-services-3.0.0.jar Required by panic_android:app:unspecified

私のGradleは次のとおりです。

apply plugin: 'com.android.application' 
    apply plugin: 'io.fabric' 
    apply plugin: 'com.google.gms.google-services' 
buildscript { 
repositories { 
    maven { url 'https://maven.fabric.io/public' } 
} 
dependencies { 
    classpath 'com.google.gms:google-services:3.0.0' 
    classpath 'io.fabric.tools:gradle:1.+' 
} 
} 
repositories { 
mavenCentral() 
maven { url 'https://maven.fabric.io/public' } 
} 
android { 
compileSdkVersion 23 
buildToolsVersion "23.0.2" 
defaultConfig { 
    applicationId "com.netvariant.panic" 
    minSdkVersion 15 
    multiDexEnabled true 
    targetSdkVersion 21 
    versionCode 2 
    versionName "1.1" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
    } 
} 
dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:23.2.0' 
compile 'com.android.support:design:23.2.0' 
compile 'com.google.android.gms:play-services:8.4.0' 
compile('com.twitter.sdk.android:twitter:[email protected]') { 
    transitive = true; 
} 
compile 'com.skyfishjy.ripplebackground:library:1.0.1' 
compile 'com.facebook.android:facebook-android-sdk:4.7.0' 
compile 'com.android.support:multidex:1.0.1' 
} 
+0

が欠けているように見えます。どうして?または、あなたがまとめた2つのファイルですか?そして、あなたは 'jCenter'を見つけていないようです –

+0

はい、jcenterを追加すると問題が解決しました –

+0

私の答えの横にあるチェックマークを使ってそれを受け入れることができます –

答えて

0

あなたは2 `repositories`のセクションを持ってjCenter()

repositories { 
    jCenter() 
    maven { url 'https://maven.fabric.io/public' } 
} 
関連する問題