当我尝试将Firebase添加到我的Android项目时,为什么会发生此错误?

时间:2018-11-17 14:42:48

标签: android firebase kotlin

我尝试在这里使用firebase      我的代码                 https://i.stack.imgur.com/WcbeT.png

           // I tried these solution and doesn't work 

   //  1. remove the

            implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
        //    and add only

            implementation 'com.google.firebase:firebase-database:16.0.1'

    //      2.
            allprojects {
              repositories {
               google()
               maven { url "https://maven.google.com" }
             }
            }

2 个答案:

答案 0 :(得分:3)

在您的应用gradle中添加以下依赖项(根据需要进行更新):

  

实现'com.google.firebase:firebase-core:x.x.x'

只需检查您提供的屏幕截图,在此行的末尾额外 $q = $this->db->select('resumes.*, jobseekers.*, categories.name AS multiple_categories') ->from('resumes') ->join('jobseekers', 'resumes.jobseeker_id = jobseekers.user_id', 'left') ->join('categories', 'resumes.category_id = categories.id', 'left') ->order_by('resumes.updated_at', 'DESC')->get(); return $q; 删除,您就可以开始了:

enter image description here

答案 1 :(得分:0)

默认情况下,最新版本的Android Studio将添加具有两个“核心值”的依存关系。

确保在同步之前,您已经拥有一个核心,例如

implementation 'com.google.firebase:firebase-database:16.0.1'

而不是

implementation 'com.google.firebase:firebase-database:15.0.0:16.0.1'
相关问题