EddyVerbruggen / nativescript-plugin-firebase

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

NS7 - @nativescript/firebase 11.0.0-rc.5 - Android - ./gradlew failed with exit code 1. #1661

Open abcfoundry opened 3 years ago

abcfoundry commented 3 years ago

Cant deploy to android. We are running latest ns cli (7.0.6-2020-09-07-183913-14253)

Looks like an error in crashlytics gradle, even though we have not enables crashlytics. I have updated android studio and tools, but looks like its getting a gradle plugin from build.

thoughts?

Details below...

Getting error.. The Android Gradle plugin supports only Crashlytics Gradle plugin version 1.28.0 and higher. The following dependencies do not satisfy the required version: root project 'fireERP' -> io.fabric.tools:gradle:1.26.1

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

package.json "dependencies": { "@alpha2k/nativescript-scss": "file:../../xplat/nativescript/scss", "@alpha2k/scss": "file:../../libs/scss", "@angular/animations": "~10.1.0", "@angular/common": "~10.1.0", "@angular/compiler": "~10.1.0", "@angular/core": "~10.1.0", "@angular/forms": "~10.1.0", "@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.0.0", "@nativescript/firebase": "rc", "@nativescript/theme": "rc", "@ngx-translate/core": "~13.0.0", "@nstudio/nativescript-checkbox": "^1.0.0", "@nstudio/nativescript-cardview": "^2.0.0", "nativescript-intl": "~4.0.2", "nativescript-ui-chart": "^8.0.2", "nativescript-pager": "^12.0.0-alpha.9", "nativescript-ui-listview": "^9.0.2", "nativescript-ui-sidedrawer": "^9.0.3", "ngx-logger": "^4.1.9", "rxjs": "^6.5.5", "tslib": "~1.11.0", "zone.js": "0.11.1" }, "devDependencies": { "@angular/compiler-cli": "10.1.0", "@angular/language-service": "10.1.0", "@nativescript/android": "7.0.0", "@nativescript/ios": "7.0.0", "@nativescript/types": "7.0.1", "@nativescript/webpack": "3.0.2", "@ngtools/webpack": "10.1.0", "typescript": "3.9.7" },

abcfoundry commented 3 years ago

Still getting error after doing below... XXXXXX

https://stackoverflow.com/questions/46494312/nativescript-android-build-throws-error-command-gradlew-bat-failed-with-exit-co

removed gradle file as directed in the post above. after running ns run android .. the gradle 6.4 distro was added to the wrappers. So im not sure where the plugin is missing dependancy

Looks like the gradle wrapper you got was corrupted. Delete your Gradle and let the android build redownload it.

Open /.gradle/ and remove the wrapper dir.

XXXXXXX

NathanWalker commented 3 years ago

@abcfoundry we're still digging into some cases - My advice would be if this plugin is blocking your ability to update to {N} 7, just stay on {N} 6 until we publish a final latest version which I would anticipate would land sometime next week at latest.

abcfoundry commented 3 years ago

@NathanWalker ... thanks for the update. No problem on waiting.. we are good for ios so it wont slow down development. I just wanted to make sure you had all the info you needed. Great job on NS7, We upgraded on weekend and will share our results later today

ok200paul commented 3 years ago

Hi all, we're seeing this too, but are unable to go back to {N} 6 as our iOS app needed to be on iOS14. Just an FYI, have subscribed for updates.

NathanWalker commented 3 years ago

@ok200paul @abcfoundry could you try: npm i -g nativescript@rc and make sure using ~11.0.0 of @nativescript/firebase. Then do a ns clean of your project. Please let us know the result and drop a stacktrace if still an issue.

ok200paul commented 3 years ago

Hey @NathanWalker - same issue by the looks, gist of stacktrace here: https://gist.github.com/ok200paul/2c7e1b46e9052857dd0c4ac7b28820af

Taken from logcat in Android Studio - I'm not a well-versed android dev or very acclimatised to to Android Studio, so I hope the above gist is relevant/shows something. Let me know if you'd like me to send anything else. It appears truncated at the start of the file, this is all that the paste out of logcat allowed.

ok200paul commented 3 years ago

Update on my side here, I had a reference to the old nativescript-plugin-firebase library in my code that I hadn't picked up on. Once I removed all references to it, the android app began to build again. My issue is resolved @NathanWalker - thanks for looking into it.