React Native Android 构建无法下载生命周期-common-java8

Ame*_*icA 6 java android gradle google-cloud-storage react-native

我正在尝试开发构建(yarn android),但是React Native的Android构建陷入了这个问题,我不知道哪个包需要这个,我做了一个新的React Native项目,一切都是正确的,但是在我的项目中,它被卡住了。当然,一个包需要这个,但我没有任何线索。

Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform lifecycle-common-java8-2.4.0.jar (androidx.lifecycle:lifecycle-common-java8:2.4.0) to match attributes {artifactType=enumerated-runtime-classes, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find lifecycle-common-java8-2.4.0.jar (androidx.lifecycle:lifecycle-common-java8:2.4.0).
        Searched in the following locations:
            https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-common-java8/2.4.0/lifecycle-common-java8-2.4.0.jar
Run Code Online (Sandbox Code Playgroud)

我可以使用浏览器下载此文件,但构建过程无法下载它。即使我想,如果我知道下载位置,我会将文件放在那里,也许会有帮助,但我不知道构建过程在哪里存储文件然后使用它。

moh*_*eti 2

这个解决方案对我有用:

步骤1:使用ssh隧道创建socks代理:

ssh -f -N -M -S /tmp/sshtunnel -D 1086 root@x.x.x.x

第2步:通过Shadowrocket通过socks代理传递我的系统流量(需要m1 macbook)

在此输入图像描述