I can't seem to get Firebase Assistant working in Android Studio and get the following error.
null
java.util.NoSuchElementException at com.google.common.collect.Iterators$1.next(Iterators.java:81) at com.google.services.firebase.DependencyStateManager.getDependencyState(DependencyStateManager.java:60) at com.google.services.firebase.DependencyStateManager.init(DependencyStateManager.java:109) at com.android.tools.idea.assistant.view.StatefulButton.(StatefulButton.java:122) at com.android.tools.idea.assistant.view.TutorialStep.(TutorialStep.java:106) at com.android.tools.idea.assistant.view.TutorialCard.redraw(TutorialCard.java:153) at com.android.tools.idea.assistant.view.TutorialCard.(TutorialCard.java:90) at com.android.tools.idea.assistant.view.FeaturesPanel.(FeaturesPanel.java:84) at com.android.tools.idea.assistant.AssistSidePanel.(AssistSidePanel.java:81) at com.android.tools.idea.assistant.AssistToolWindowFactory.createToolWindowContent(AssistToolWindowFactory.java:37) at com.android.tools.idea.assistant.OpenAssistSidePanelAction.lambda$openWindow$0(OpenAssistSidePanelAction.java:59) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:732) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:650) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
I've installed all the plugins and SDK Tools required including:
Google Repository
Firebase App Indexing
Firebase Services
Firebase Testing
My configurations are as follows.
build.gradle
buildscript {
ext.kotlin_version = '1.2.31'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:3.2.0' // google-services plugin
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
app/build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 27
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.networks.hn"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.google.firebase:firebase-core:12.0.1'
compile 'com.google.firebase:firebase-core:12.0.1'
compile 'com.google.firebase:firebase-storage:12.0.1'
compile 'com.google.firebase:firebase-auth:12.0.1'
compile 'com.google.firebase:firebase-messaging:12.0.1'
compile 'com.google.firebase:firebase-database:12.0.1'
}
apply plugin: 'com.google.gms.google-services'
pubspec.yaml
dependencies:
flutter:
sdk: flutter
intl: "^0.15.2"
flutter_localizations:
sdk: flutter
redux: "^2.1.1"
flutter_redux: "^0.3.5"
transparent_image: "^0.1.0"
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.0
# Cloudstore Firebase
cloud_firestore: ^0.3.2
When I try integrating anything firebase in the application I get a series of compile errors which go away when I remove that code. I suspect I have something misconfigured or there is a version conflict somewhere.
I am running Android Studio 3.1