2017-10-03 1 views
1

다음은 내 앱 gradle 파일의 종속 항목입니다. 이 오류를 어떻게 해결할 수 있습니까?해결 실패 : com.google.firebase : firebase-auth : 11.4.0

allprojects { 
    // ... 
    repositories { 
     // ... 
     maven { 
      url "https://maven.google.com" // Google's Maven repository 
     } 
    } 
} 

경우 :

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:26.+' 
    androidTestCompile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.google.firebase:firebase-database:11.4.0' 
    compile 'com.google.firebase:firebase-crash:11.4.0' 
    compile 'com.google.firebase:firebase-auth:11.4.0' 
    androidTestCompile 'junit:junit:4.12' 
} 
apply plugin: 'com.google.gms.google-services' 
+0

을 확인하십시오. googleService.json을 프로젝트에 붙여 넣었습니까? –

+0

예, JSON 파일을 내 앱 폴더에 붙여 넣었습니다. –

+0

다음 아래 언급 된 솔루션을 시도하십시오. –

답변

3

루트 수준이 포함 build.gradle 파일 (없는 응용 프로그램 레벨) bulid.gradle 파일에 maven { url "https://maven.google.com" } 추가 자세한 안내는 Firebase Integration Guide.

+0

애태의 붙여 넣기 나는이 오류가 발생했습니다 'com.example.sayan.appfire'속성의 'layout_constraintTop_toTopOf'속성에 대한 자원 식별자를 찾을 수 없습니다. 'com.example.sayan.appfire'패키지의 'layout_constraintLeft_toLeftOf'속성 –

+0

제약 조건 레이아웃 종속성을 제거했을 수 있습니다. 두 build.gradle 파일을 게시하십시오. –

+0

루트 수준의 종속성 종속 { 클래스 경로 'com.android.tools.build:gradle:2.3.3' 클래스 경로 'com.google.gms : 구글 - 서비스 : 3.1.0' } allprojects { 저장소 { jcenter() 받는다는 { URL "https://maven.google.com"// 구글의 메이븐 저장소 } } } –

2

루트 수준

allprojects { 
    repositories { 
     jcenter() 
     maven { 
      url "https://maven.google.com" 
     } 
    } 
} 
+0

붙여 넣기 후이 오류가 발생합니다 'com.example.sayan.appfire'패키지의 'layout_constraintTop_toTopOf'속성에 대한 리소스 식별자가 없습니다 'com.example.sayan.appfire'속성의 'layout_constraintLeft_toLeftOf'속성에 대한 리소스 식별자가 없습니다 ' –

+0

build.gradle 파일에 종속성을 추가하십시오. 'compile'com.android.support.constraint : constraint-layout : 1.0.2'' –

+0

이미저기서 쓰여졌습니다. 그러나 아직도 나는이 오류를 받고있다! –

관련 문제