I am trying to start the Friendly Chat Firebase tutorial. But the gradle build throws an error and I can't really give anymore information as I don't know where to begin. However, a picture is worth a thousand words, and I believe that it contains everything relevant.
- Files downloaded from git google.json copied across
- Dependencies added and applied
- Build tools and IDE updated
I noticed there is only a project build.gradle
I cant find a module build.gradle
. I have no idea if this has anything to do with the issue though.
Originally threw error about unregistered VCS root, I clicked add root, but it didn't help.
Both build.gradle
files are blue and when I click either one, it opens the tab named android-start(also blue), but the path is C:\Users\User1\friendlychat\android-start\build.gradle
and the file contents are:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.android.tools.build:gradle:2.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenLocal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.google.gms.google-services'
EDIT: LogCat says configure Android SDK
If I click configure and set the SDK version and build tools version I get:
Error:(31, 0) Could not find method android() for arguments [build_coejwo2h3fxgj0snev4rovui4$_run_closure4@512b9d86] on root project 'android-start' of type org.gradle.api.Project.
<a href="openFile:C:\Users\User1\friendlychat\android-start\build.gradle">Open File</a>