EddyVerbruggen / nativescript-plugin-firebase

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

Can't build for Android since bintray shut down #1812

Open ManciuStefan opened 3 years ago

ManciuStefan commented 3 years ago

Hello,

I have a Nativescript app that I can't build anymore since bintray shut down. I went and found out that the firebase plugin has a postInstall.js script that overwrites the build.gradle with a bintray URL and I can't figure out how to change it. Is there any solution to this problem? My nativescript-plugin-firebase version is 10.6.3 and this is the error I'm getting:

`Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not resolve com.google.android.gms:play-services-base:[15.0.1,16.0.0). Required by: project :app > com.google.android.gms:play-services-location:15.0.1 Failed to list versions for com.google.android.gms:play-services-base. Unable to load Maven meta-data from http://dl.bintray.com/pixplicity/android/com/google/android/gms/play-services-base/maven-metadata.xml. Could not get resource 'http://dl.bintray.com/pixplicity/android/com/google/android/gms/play-services-base/maven-metadata.xml'. Could not GET 'http://dl.bintray.com/pixplicity/android/com/google/android/gms/play-services-base/maven-metadata.xml'. Received status code 403 from server: Forbidden Could not resolve com.google.android.gms:play-services-basement:[15.0.1,16.0.0). Required by: project :app > com.google.android.gms:play-services-location:15.0.1 project :app > com.google.android.gms:play-services-places-placereport:15.0.1 Failed to list versions for com.google.android.gms:play-services-basement. Unable to load Maven meta-data from http://dl.bintray.com/pixplicity/android/com/google/android/gms/play-services-basement/maven-metadata.xml. Could not get resource 'http://dl.bintray.com/pixplicity/android/com/google/android/gms/play-services-basement/maven-metadata.xml'. Could not GET 'http://dl.bintray.com/pixplicity/android/com/google/android/gms/play-services-basement/maven-metadata.xml'. Received status code 403 from server: Forbidden Could not resolve com.google.android.gms:play-services-tasks:[15.0.1,16.0.0). Required by: project :app > com.google.android.gms:play-services-location:15.0.1 Failed to list versions for com.google.android.gms:play-services-tasks. Unable to load Maven meta-data from http://dl.bintray.com/pixplicity/android/com/google/android/gms/play-services-tasks/maven-metadata.xml. Could not get resource 'http://dl.bintray.com/pixplicity/android/com/google/android/gms/play-services-tasks/maven-metadata.xml'. Could not GET 'http://dl.bintray.com/pixplicity/android/com/google/android/gms/play-services-tasks/maven-metadata.xml'. Received status code 403 from server: Forbidden`

Thanks!

paul-castro commented 3 years ago

I also encounter this issue right now, any updates?

wamfever commented 3 years ago

The packages that were available on bintray are now available on JCenter. Here's a quick workaround if you wish to build:

buildGradleContent = buildGradleContent.substr(0, repositoriesNode - 1) + '\t\tmaven { url "https://maven.fabric.io/public" }\n\t\tmaven { url "https://dl.bintray.com/android/android-tools" }\n' + buildGradleContent.substr(repositoriesNode - 1);

should become :

buildGradleContent = buildGradleContent.substr(0, repositoriesNode - 1) + '\t\tmaven { url "https://maven.fabric.io/public" }\n' + buildGradleContent.substr(repositoriesNode - 1);

... then run the build process. If you completele removed bintray, it will work now.

JCenter repository is already in the build.gradle, so now the only needed change is to completely remove bintray as a dependency from anywhere you find it.

Some nativescript packages might also have their own include.gradle containing bintray urls, if that's the case you will have to fork them, completely remove the bintray urls, and add JCenter as a repository if not already there.

Woongsik commented 2 years ago

Hi, I have the same issue and any updates or solution? @wamfever Your suggestion is not working for me as well.

I use tns-android: 6.5.3 and nativescript-plugin-firebase: 10.6.3

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac Could not GET 'https://dl.bintray.com/crysis21/Android/com/google/android/gms/play-services-base/maven-metadata.xml'. Received status code 403 from server: Forbidden

ManciuStefan commented 2 years ago

Hello! We (@wamfever and I) also downgraded to 10.5.2 (can't really remember the reason, but that's the version we're at now) to make this works. Also, make sure you change the firebase-build-gradle.js after you've run "npm install", but before you run the build. This fix must be done after every install and, if you've built the app without fixing it, you must also make sure you delete the platforms folder too, since it also stores the bintray urls. Hope this helps! If it does, I recommend creating a script that does all this for you, otherwise it gets very annoying very fast.

Woongsik commented 2 years ago

@ManciuStefan Hi, thanks for the message and help. I was having trouble with other plugins include.gradle containing bintray urls as well but I removed them. Finally it seems fine and working nicely. ( working with nativescript-plugin-firebase: 10.6.3 )

paul-castro commented 2 years ago

is there any solution for this?

adityamadchetti commented 1 year ago

any solution for this?