0

I am new to Xamarin and trying to integrate firebase SDK in a project. When I am trying to use gradle for pulling the jars I am getting an issue -

Gradle log:

FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\ss-1\AppData\Local\Temp\Xamarin.GradleBindings\91bd26\build.gradle' line: 5

  • What went wrong: A problem occurred evaluating root project '91bd26'.

    Could not resolve all dependencies for configuration 'detachedConfiguration1'. Could not find com.google.firebase:firebase-core:9.2.0. Searched in the following locations: file:/C:/Users/ss-1/AppData/Local/Android/android-sdk/extras/android/m2repository/com/google/firebase/firebase-core/9.2.0/firebase-core-9.2.0.pom file:/C:/Users/ss-1/AppData/Local/Android/android-sdk/extras/android/m2repository/com/google/firebase/firebase-core/9.2.0/firebase-core-9.2.0.jar https://jcenter.bintray.com/com/google/firebase/firebase-core/9.2.0/firebase-core-9.2.0.pom https://jcenter.bintray.com/com/google/firebase/firebase-core/9.2.0/firebase-core-9.2.0.jar Required by: :91bd26:unspecified

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 8.451 secs

Original script:

apply plugin: 'java'

def resolveDependencyString(String dependencyString) {
   def dependency = dependencies.create(dependencyString)
   configurations.detachedConfiguration(dependency).setTransitive(false).resolve()
}

def resolveDependencyStringTransitive(String dependencyString) {
   def dependency = dependencies.create(dependencyString)
   configurations.detachedConfiguration(dependency).setTransitive(true).resolve()
}

repositories { 
   maven {
       url "C:/Users/ss-1/AppData/Local/Android/android-sdk/extras/android/m2repository/" //will be replaced by add-in
   }
   jcenter()
}

task getDeps(type: Copy) {
 def resultFileAll = new File("C:/Users/ss-1/AppData/Local/Temp/Xamarin.GradleBindings/91bd26/result_main.txt")
 def resultFileMain = new File("C:/Users/ss-1/AppData/Local/Temp/Xamarin.GradleBindings/91bd26/result_all.txt")

Please let me know, how it can be fixed.

Thank You, Prashant

1 Answers1

0

There are no updates on official integration of FCM with Xamarin. Do check this website for more details.

Docs for integrating FCM with Xamarin?

Xamarin doesn't have a guide about how to integrate FCM with your Xamarin.Android app. Still Xamarin has been integrated with GCM and GCM is not yet officialy stoped by Google, So you can use GCM in your project.

Here is the Link to check out original post.

Community
  • 1
  • 1