ReallySmallSoftware / cordova-plugin-firestore

A Google Firebase Firestore plugin to enable realtime synchronisation between app and cloud and automatically handle limited connectivity.
Other
22 stars 10 forks source link

Build fail #14

Open gabrielpotumati opened 5 years ago

gabrielpotumati commented 5 years ago

Error on build, any idea how to resolve?

cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

BUILD FAILED in 5s

My config.xml is:

<plugin name="cordova-plugin-firestore" spec="1.3.2">
    <variable name="ANDROID_FIREBASE_CORE_VERSION" value="16.0.8" />
    <variable name="ANDROID_FIREBASE_FIRESTORE_VERSION" value="18.1.0" />
</plugin>
gabrielpotumati commented 5 years ago

Fixed now, I do not know exactly how I fixed it, but I will pass what I did: 1 - in: "platforms\android\project.properties" I changed all the summer library to + ex: cordova.gradle.include.1=cordova-plugin-enable-multidex/mstaxi-build.gradle cordova.gradle.include.2=cordova-plugin-firestore/mstaxi-firestore.gradle cordova.system.library.1=com.squareup.okhttp3:okhttp-urlconnection:3.10.0 cordova.system.library.2=com.android.support:support-v4:+ cordova.gradle.include.3=cordova-plugin-mauron85-background-geolocation/mstaxi-dependencies.gradle cordova.system.library.3=com.google.firebase:firebase-core:+ cordova.system.library.4=com.google.firebase:firebase-firestore:+ cordova.system.library.5=com.google.code.gson:gson:+ cordova.gradle.include.4=onesignal-cordova-plugin/mstaxi-build-extras-onesignal.gradle cordova.system.library.6=com.google.android.gms:play-services-location:+ cordova.system.library.7=com.android.support:support-v4:+ cordova.system.library.8=com.android.support:appcompat-v7:+ cordova.system.library.9=com.onesignal:OneSignal:3.10.5

2 - then I installed the plugin: cordova-plugin-enable-multidex

3 - and in platforms\android\build.gradle in project.ext i added multiDexEnabled=true ex: project.ext { defaultBuildToolsVersion="27.0.1" //String defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4 defaultTargetSdkVersion=27 //Integer - We ALWAYS target the latest by default defaultCompileSdkVersion=27 //Integer - We ALWAYS compile with the latest by default multiDexEnabled=true }

and executed the command cordova clean

ReallySmallSoftware commented 5 years ago

Thank you for this information.

goodwid commented 5 years ago

I installed cordova-plugin-enable-multidex from this fork of the original and it worked fine without any changes to gradle files.