Android build fails in 0.71.0-rc.0 with "Could not find com.facebook.react:react-native:0.71.0-rc.0"

See original GitHub issue

Description

I’m trying to test the new release candidate. I’ve created a new app, but when trying to start the app on Android, I get the following error (output of yarn android --variant=release yields more info:

* What went wrong:
Could not determine the dependencies of task ':app:mergeDexRelease'.
> Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'.
   > Could not find com.facebook.react:react-native:0.71.0-rc.0.
     Searched in the following locations:
       - file:/Users/me/RN0710RC0/node_modules/react-native/android/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0.pom
       - file:/Users/me/RN0710RC0/node_modules/jsc-android/dist/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0.pom
       - https://repo.maven.apache.org/maven2/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0.pom
       - https://dl.google.com/dl/android/maven2/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0.pom
       - https://www.jitpack.io/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0.pom
       - https://oss.sonatype.org/content/repositories/snapshots/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0.pom
     Required by:
         project :app
   > Could not find com.facebook.react:hermes-engine:0.71.0-rc.0.
     Searched in the following locations:
       - file:/Users/me/RN0710RC0/node_modules/react-native/android/com/facebook/react/hermes-engine/0.71.0-rc.0/hermes-engine-0.71.0-rc.0.pom
       - file:/Users/me/RN0710RC0/node_modules/jsc-android/dist/com/facebook/react/hermes-engine/0.71.0-rc.0/hermes-engine-0.71.0-rc.0.pom
       - https://repo.maven.apache.org/maven2/com/facebook/react/hermes-engine/0.71.0-rc.0/hermes-engine-0.71.0-rc.0.pom
       - https://dl.google.com/dl/android/maven2/com/facebook/react/hermes-engine/0.71.0-rc.0/hermes-engine-0.71.0-rc.0.pom
       - https://www.jitpack.io/com/facebook/react/hermes-engine/0.71.0-rc.0/hermes-engine-0.71.0-rc.0.pom
       - https://oss.sonatype.org/content/repositories/snapshots/com/facebook/react/hermes-engine/0.71.0-rc.0/hermes-engine-0.71.0-rc.0.pom
     Required by:
         project :app

Also on https://repo.maven.apache.org/maven2/com/facebook/react/react-native/, I see “0.71.0-rc.0” but clicking on it returns a 404.

Is there something I am missing to be able to test the new release candidate?

Version

0.71.0-rc.0

Output of npx react-native info

System:
    OS: macOS 12.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 26.56 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.11.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - ~/.npm-global/bin/yarn
    npm: 8.19.2 - /opt/homebrew/bin/npm
    Watchman: 2022.10.24.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9014738
    Xcode: 14.1/14B47b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.16.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.0-rc.0 => 0.71.0-rc.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

npx react-native init RN0710RC0 --version 0.71.0-rc.0
cd RN0710RC0
yarn android

Snack, code example, screenshot, or link to a repository

I put the result of a newly created project here: https://github.com/louiszawadzki/RN0710RC0

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
louiszawadzkicommented, Nov 9, 2022

One last thing about libraries, when I add react-native libraries that have the line

implementation 'com.facebook.react:react-native:+'

in their build.gradle (like https://github.com/DataDog/dd-sdk-reactnative I’m working on), I get the following error when building for Android:

Could not determine the dependencies of task ':datadog_mobile-react-native:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':datadog_mobile-react-native:debugCompileClasspath'.
   > Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available.
     Required by:
         project :datadog_mobile-react-native

Is it something due to the use of the maven-local or is it supposed to be fixed in a next 0.71 RC?

Tell me if you think this needs a new issue, I can open it 😃

2reactions
louiszawadzkicommented, Nov 9, 2022

Hi @cipolleschi @kelset, thanks for your quick help!

I think you need to update the links to maven-local.zip in both release and discussion - it links to https://github.com/facebook/react-native/blob/v0.71.0-rc.0 which shows a 404 to me. However there is a link at the bottom of the release (https://github.com/facebook/react-native/releases/download/v0.71.0-rc.0/maven-local.zip) which works 😉

After that I was able to start my app with the steps you provided 😃

Feel free to close this issue once the links are updated

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Android build failure with different errors without ...
The build failures for Android was due to the publish of the React Native version 0.71.0-rc0 . Note: Error may be different but...
Read more >
How to solve this error : r/reactnative - Reddit
My RN version is 0.66.4 * What went wrong: Execution failed for task ':app:checkDebugAarMetadata'. > Could not resolve all files for ...
Read more >
configure project :react-native-reanimated aar for ... - You.com
Failed to transform react-native-0.71.0-rc.0-debug.aar ... Could anyone figure out why when I build using expo run:android I got failed ?
Read more >
Dealing With Problems With Building the App & Detox
This page is about issues related to building the app, typically triggered when running detox build (and not detox test, for example).
Read more >
SDK Build Tools release notes - Android Developers
AIDL fails with build-tools 33.0.0. (See issue #236167971). Build Tools, Revision 30.0.0 rc4 (May 2020). This update includes support for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found