简体   繁体   English

Caused by: org.gradle.api.GradleException: 找不到满足版本约束的 'com.google.protobuf:protobuf-javalite' 版本:

[英]Caused by: org.gradle.api.GradleException: Cannot find a version of 'com.google.protobuf:protobuf-javalite' that satisfies the version constraints:

I am facing an error while building an android app with react-native, If anyone has an idea then help me out.我在使用 react-native 构建 android 应用程序时遇到错误,如果有人有想法,请帮助我。

Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.google.protobuf:protobuf-javalite:{strictly [3.0, 4.0[}.
     Required by:
         project :app > project :logrocket_react-native
      > Cannot find a version of 'com.google.protobuf:protobuf-javalite' that satisfies the version constraints:

This is my logrocket version:这是我的 logrocket 版本:

"@logrocket/react-native": "1.6.2",

It seems like that version is broken.好像那个版本坏了。 There needs to be someone on their team to fix their dependency, but on the meantime you can override the version of protobuf-javalite that it is using.他们的团队中需要有人修复他们的依赖关系,但与此同时,您可以覆盖它正在使用的 protobuf-javalite 版本。

Our team has found a hotfix open /node_modules/@logrocket/react-native/android/build.gradle我们的团队找到了一个修补程序 open /node_modules/@logrocket/react-native/android/build.gradle

and make this change并做出改变在此处输入图像描述

        version {
            strictly '[3.0, 21['
        }
    }

Just started getting the same issue on native Android today.今天刚开始在本机 Android 上遇到同样的问题。

Could not resolve com.google.protobuf:protobuf-javalite:{strictly [3.0, 4.0[;无法解析 com.google.protobuf:protobuf-javalite:{严格 [3.0, 4.0[; prefer 3.19.1}.喜欢 3.19.1}。 Required by: project:app > com.logrocket:logrocket:1.11.0 > Could not resolve com.google.protobuf:protobuf-javalite:3.22.0-RC1.要求:project:app > com.logrocket:logrocket:1.11.0 > 无法解析 com.google.protobuf:protobuf-javalite:3.22.0-RC1。 > Could not parse POM https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-javalite/3.22.0-RC1/protobuf-javalite-3.22.0-RC1.pom > Could not find com.google.protobuf:protobuf-parent:3.22.0-RC1. > 无法解析 POM https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-javalite/3.22.0-RC1/protobuf-javalite-3.22.0-RC1.pom > 找不到 881680887007 google.protobuf:protobuf-parent:3.22.0-RC1。

Tried upping and downgrading logrocket version, checking out a commit in my project from when it was still working, etc, but it's still bugged.尝试升级和降级 logrocket 版本,从我的项目仍在工作时检查我的项目中的提交等,但它仍然存在错误。 Seems like an issue from logrocket.似乎是 logrocket 的问题。

Yea, tried setting protobuf version between 3.0 to 4.0, cleared cache, re-built the app, still no luck.是的,尝试将 protobuf 版本设置在 3.0 到 4.0 之间,清除缓存,重新构建应用程序,仍然没有成功。 Disabled log-rocket for now, till a solution is found.暂时禁用日志火箭,直到找到解决方案。

Caused by protobuf issue: https://github.com/protocolbuffers/protobuf/issues/11719由 protobuf 问题引起: https://github.com/protocolbuffers/protobuf/issues/11719

For anyone affected by this due to the LogRocket SDK, the LogRocket team has stated that they are attempting to mitigate the issue from their side.对于因 LogRocket SDK 而受到此影响的任何人,LogRocket 团队表示他们正试图从他们这边缓解这个问题。

I spoke with LogRocket support about this and they just got back and said they've released version 1.11.1 which tightens up the dependency on protobuf and fixes this.我与 LogRocket 支持人员谈过这个问题,他们刚回来说他们已经发布了版本 1.11.1,它加强了对 protobuf 的依赖并修复了这个问题。 Release notes here: https://docs.logrocket.com/docs/mobile-sdk-changelog#1111-2023-01-31此处的发行说明: https://docs.logrocket.com/docs/mobile-sdk-changelog#1111-2023-01-31

I was also facing the same issue from past one day.过去一天我也面临同样的问题。 Changing the version strictly [3.0, 4.0[ to strictly '3.19.1'in Firebase in Nodemodules->logRocket->android->build.gradle and creating a patch package for it worked for me now.在 Nodemodules->logRocket->android->build.gradle 的 Firebase 中将版本严格 [3.0, 4.0[ 严格更改为 '3.19.1' 并为其创建补丁 package 现在对我有用。

update the package @logrocket/react-native to 1.11.1 should fix the issue将 package @logrocket/react-native更新到1.11.1应该可以解决这个问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ANDROID:org.gradle.api.GradleException:找不到满足版本约束的“org.jetbrains.kotlin:kotlin-stdlib”版本 - ANDROID: org.gradle.api.GradleException: Cannot find a version of 'org.jetbrains.kotlin:kotlin-stdlib' that satisfies the version constraints org.gradle.api.GradleException:请修复版本冲突 - org.gradle.api.GradleException: Please fix the version conflict either 原因:org.gradle.api.GradleException:没有为 package 名称“com.faizan4742.medmobile”找到匹配的客户端 - Caused by: org.gradle.api.GradleException: No matching client found for package name 'com.faizan4742.medmobile' Android Studio org.gradle.api.GradleException - Android Studio org.gradle.api.GradleException 找不到满足版本约束的“com.google.code.findbugs:jsr305”版本 - Cannot find a version of 'com.google.code.findbugs:jsr305' that satisfies the version constraints 使用 firestore 时找不到满足版本限制的“com.google.code.gson:gson”版本 - Cannot find a version of 'com.google.code.gson:gson' that satisfies the version constraints when using firestore 如何解决找不到满足版本约束的'com.google.android.material:material'版本 - how to solve Cannot find a version of 'com.google.android.material:material' that satisfies the version constraints 错误:无法在Android Studio导入的项目中找到:com.google.protobuf:protobuf-java:2.5 - Error:Failed to find: com.google.protobuf:protobuf-java:2.5 in Android Studio imported project 如何在完整的Android项目(渐变)中包含“ com.google.protobuf”,而不是精简的形式? - How do you include 'com.google.protobuf' on android project (gradle) as full but not as lite? Android Studio和protobuf错误:(7,0)找不到ID为'com.google.protobuf'的插件 - Android Studio and protobuf Error:(7, 0) Plugin with id 'com.google.protobuf' not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM