0

Error:A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApkCopy'. Could not find com.google.firebase:firebase-core:10.1.0. Required by: FirstApp:app:unspecified Could not find com.google.firebase:firebase-database:10.1.0. Required by: FirstApp:app:unspecified

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.google.firebase:firebase-core:10.1.0' 
    compile 'com.google.firebase:firebase-database:10.1.0' 
    androidTestCompile('com.android.support.test.espresso:espres‌​so-core:2.2.2', {
        exclude group: 'com.android.support',
        module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.1' 
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
DanielBarbarian
  • 5,093
  • 12
  • 35
  • 44
Rohan Raju
  • 19
  • 3
  • use `10.2.0` version – IntelliJ Amiya Feb 18 '17 at 07:03
  • Just read the Documentation of firebase there is clearly mentioned the dependencies and exclude options .[here](https://firebase.google.com/docs/android/setup) and see [this too](http://stackoverflow.com/questions/31759101/firebase-android-sdk-causing-gradle-error-with-no-error-cause) – ADM Feb 18 '17 at 07:10
  • can u paste ur gradle file. – Aman Shekhar Feb 18 '17 at 07:14
  • dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.google.firebase:firebase-core:10.1.0' compile 'com.google.firebase:firebase-database:10.1.0' 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:25.1.1' testCompile 'junit:junit:4.12' } apply plugin: 'com.google.gms.google-services' – Rohan Raju Feb 18 '17 at 09:34

1 Answers1

0

Hi it is a problem with version of library
In my case i changed the version

com.google.firebase:firebase-core:10.1.0.             
com.google.firebase:firebase-database:10.1.0

to

com.google.firebase:firebase-core:10.0.0.             
com.google.firebase:firebase-database:10.0.0
Ramesh Maharjan
  • 41,071
  • 6
  • 69
  • 97