DarshanGowda0 / GeoFlutterFire

:fire:GeoFlutterFire:fire: is an open-source library that allows you to store and query firestore documents based on their geographic location.
https://youtu.be/MYHVyl-juUk
MIT License
305 stars 261 forks source link

Build fails #1

Closed MrMagloire closed 5 years ago

MrMagloire commented 5 years ago

Hi I am trying to build an app but I get the following error:

* Error running Gradle:
ProcessException: Process "D:\DEV\MobileApp\MyApp\android\gradlew.bat" exited abnormally:
Starting a Gradle Daemon, 1 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':geoflutterfire'.
> Failed to notify project evaluation listener.
   > java.lang.AbstractMethodError (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 23s
Picked up _JAVA_OPTIONS: -Xmx512M
  Command: D:\DEV\MobileApp\MyApp\android\gradlew.bat app:properties
Please review your Gradle project setup in the android/ folder.
Exited (sigterm)

VERSIONS:

$ flutter doctor -v
[√] Flutter (Channel dev, v1.1.9, on Microsoft Windows [version 6.3.9600], locale fr-FR)
    • Flutter version 1.1.9 at D:\DEV\DevTools\flutter
    • Framework revision 1407091bfb (2 weeks ago), 2019-01-08 20:40:19 -0800
    • Engine revision e5ec3cf3ea
    • Dart version 2.1.1 (build 2.1.1-dev.0.1 2cb346bd0c)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\MrMaguy\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = C:\Users\MrMaguy\AppData\Local\Android\sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

[√] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 28.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[!] IntelliJ IDEA Ultimate Edition (version 2017.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.2
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[√] VS Code, 64-bit edition (version 1.30.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.21.1

[√] Connected device (1 available)
    • Infinix X521 • J5088A1R68265944 • android-arm64 • Android 6.0 (API 23)

! Doctor found issues in 1 category.

Also my current gradle version is 4.1 I mention that I also have firestore_auth and google_sign_in in dependencies

DarshanGowda0 commented 5 years ago

@MrMagloire The issue seems to be with cloud_firestore dependency as mentioned here and here. This should solve the problem, also I'd suggest to switch to master channel and run flutter upgrade in your project directory.

MrMagloire commented 5 years ago

Regarding multiDexEnabled, this is already true in app/build.gradle, All is normal in buildscript

buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:4.1.0'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-4'
    }
}

, when i add geoflutterfire, build fails but when i create new project with only cloud_firestore and geoflutterfire everything is going well.

DarshanGowda0 commented 5 years ago

@MrMagloire this should solve your issue!