Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails due to error Could not find com.google.firebase:firebase-crashlytics-ktx:. #2126

Closed
bro1 opened this issue Sep 14, 2023 · 5 comments · Fixed by #2127
Closed

Build fails due to error Could not find com.google.firebase:firebase-crashlytics-ktx:. #2126

bro1 opened this issue Sep 14, 2023 · 5 comments · Fixed by #2127

Comments

@bro1
Copy link

bro1 commented Sep 14, 2023

Overview

Hi, I am trying to build the main version from cloned from github on 13 Sep.

But the build is failing with the error:

Could not find com.google.firebase:firebase-crashlytics-ktx:.

Full error message once I select Build -> Make Project is:

Configuration cache state could not be cached: field `provider` of `org.gradle.configurationcache.serialization.codecs.ProviderBackedFileCollectionSpec` bean found in field `element` of `java.util.Collections$SingletonList` bean found in field `elements` of `org.gradle.configurationcache.serialization.codecs.ResolutionBackedFileCollectionSpec` bean found in field `__classpathSnapshot__` of `org.jetbrains.kotlin.gradle.tasks.KotlinCompile$ClasspathSnapshotProperties` bean found in field `__classpathSnapshotProperties__` of task `:logging:crashlytics:compileDebugKotlin` of type `org.jetbrains.kotlin.gradle.tasks.KotlinCompile`: error writing value of type 'org.gradle.api.internal.provider.DefaultProvider'
> Could not resolve all files for configuration ':logging:crashlytics:debugCompileClasspath'.
   > Could not find com.google.firebase:firebase-crashlytics-ktx:.
     Required by:
         project :logging:crashlytics

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Are there any project specific steps required for crashlytics for Voice?
Or should I search for generic solution for this problem?

thanks
Linas

How to reproduce

  1. git clone the project
  2. open the project in Android Studio
  3. Build
  4. Make Project

Version

main

Android Version

dev

Device Model

dev

@bro1
Copy link
Author

bro1 commented Sep 14, 2023

Additionally, I have also tried
setting the following in voice.yml:

VOICE_USE_PROPRIETARY_LIBRARIES: "false"

And I am still getting the same result (this time building from command line):

bro1@bro1-IdeaPad-Flex-5-15ALC05:~/projects/Voice$ ./gradlew build
Calculating task graph as no configuration cache is available for tasks: build
Type-safe project accessors is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
Configuration cache state could not be cached: field `provider` of `org.gradle.configurationcache.serialization.codecs.ProviderBackedFileCollectionSpec` bean found in field `element` of `java.util.Collections$SingletonList` bean found in field `elements` of `org.gradle.configurationcache.serialization.codecs.ResolutionBackedFileCollectionSpec` bean found in field `__classpathSnapshot__` of `org.jetbrains.kotlin.gradle.tasks.KotlinCompile$ClasspathSnapshotProperties` bean found in field `__classpathSnapshotProperties__` of task `:logging:crashlytics:compileDebugKotlin` of type `org.jetbrains.kotlin.gradle.tasks.KotlinCompile`: error writing value of type 'org.gradle.api.internal.provider.DefaultProvider'
> Could not resolve all files for configuration ':logging:crashlytics:debugCompileClasspath'.
   > Could not find com.google.firebase:firebase-crashlytics-ktx:.
     Required by:
         project :logging:crashlytics

@PaulWoitaschek
Copy link
Owner

Thanks for the report!

Does this fix it for you?
#2127

@PaulWoitaschek
Copy link
Owner

Btw on Android you usually never want to use the Build - Make Project button. That will also create the release and debug artifacts in all flavors.
Usually you either want to run the tests - or deploy to a device.

@bro1
Copy link
Author

bro1 commented Sep 15, 2023

Thanks for the report!

Does this fix it for you?
#2127

Yes, thank you very much :)

Now one of the build steps fails with out of memory error, but I should be able to figure that one out once I get a chance to take s look at it again next week.

@PaulWoitaschek
Copy link
Owner

For that you should set org.gradle.jvmargs, specific to your machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants