EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

Failed to build plugin @nativescript/firebase : Error: Command gradlew.bat failed with exit code 1 #1833

Open kb11111 opened 2 years ago

kb11111 commented 2 years ago

When I run my app I am getting this error:

nativescript-plugin-firebase: building for same environment, not forcing prepare.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':javaPreCompileRelease'.
> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
  The following AndroidX dependencies are detected: androidx.versionedparcelable:versionedparcelable:1.0.0, androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.core:core:1.0.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.1.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 9s
Failed to build plugin @nativescript/firebase :   
Error: Command gradlew.bat failed with exit code 1

In my gradle.properties file I have: android.useAndroidX=true

It is my firebase.nativescript.json file:

{
    "using_ios": true,
    "using_android": true,
    "analytics": true,
    "firestore": false,
    "realtimedb": false,
    "authentication": false,
    "remote_config": false,
    "performance_monitoring": false,
    "external_push_client_only": false,
    "messaging": true,
    "in_app_messaging": false,
    "crashlytics": false,
    "storage": false,
    "functions": false,
    "facebook_auth": false,
    "google_auth": false,
    "admob": false,
    "dynamic_links": false,
    "ml_kit": false
}

and my package.json:

"dependencies": {
    "@angular/animations": "~10.1.0",
    "@angular/cdk": "^10.2.7",
    "@angular/common": "~10.1.0",
    "@angular/compiler": "~10.1.0",
    "@angular/core": "~10.1.0",
    "@angular/forms": "~10.1.0",
    "@angular/material": "^10.2.7",
    "@angular/platform-browser": "~10.1.0",
    "@angular/platform-browser-dynamic": "~10.1.0",
    "@angular/router": "~10.1.0",
    "@nativescript/angular": "~10.1.0",
    "@nativescript/core": "~7.1.0",
    "@nativescript/datetimepicker": "^2.0.0",
    "@nativescript/firebase": "^11.1.3",
    "@nativescript/local-notifications": "^5.0.3",
    "@nativescript/theme": "~3.0.0",
    "@ngx-translate/core": "^13.0.0",
    "@ngx-translate/http-loader": "^6.0.0",
    "@vulksoft/nativescript-platform-css": "^1.6.16",
    "moment": "^2.29.1",
    "nativescript-barcodescanner": "^4.1.1",
    "nativescript-fingerprint-auth": "^7.0.2",
    "nativescript-nfc": "^5.0.0",
    "nativescript-secure-storage": "^2.6.2",
    "nativescript-ui-calendar": "^7.0.4",
    "nativescript-ui-sidedrawer": "^9.0.3",
    "nativescript-videoplayer": "^5.0.1",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.6.0",
    "sass": "^1.35.2",
    "zone.js": "~0.11.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.1002.2",
    "@angular/cli": "^10.2.1",
    "@angular/compiler-cli": "~10.1.0",
    "@nativescript/android": "7.0.1",
    "@nativescript/types": "~7.0.0",
    "@nativescript/webpack": "~4.0.0",
    "node-sass": "^6.0.1",
    "typescript": "~4.0.0"
  },

How can I fix it? Please help.