react-native: Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available.

New Version

0.71.0, 0.71.0-rc.3 (tried both)

Old Version

0.68.5

Build Target(s)

android development debug

Output of react-native info

System: OS: macOS 12.6 CPU: (10) arm64 Apple M1 Pro Memory: 129.95 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.10.0 - /opt/homebrew/bin/node Yarn: Not Found npm: 8.19.2 - /opt/homebrew/bin/npm Watchman: 2022.10.03.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: API Levels: 28, 29, 30, 31, 32, 33 Build Tools: 28.0.3, 30.0.2, 31.0.0, 32.0.0, 32.1.0, 33.0.0, 33.0.1 System Images: android-30 | Google Play ARM 64 v8a, android-33 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9014738 Xcode: 14.1/14B5033e - /usr/bin/xcodebuild Languages: Java: 11.0.16.1 - /opt/homebrew/opt/openjdk@11/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.0-rc.3 => 0.71.0-rc.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

./gradlew installDevelopmentDebug

FAILURE: Build failed with an exception.

  • What went wrong: Could not determine the dependencies of task ‘:react-native-linear-gradient:compileDebugAidl’.

Could not resolve all task dependencies for configuration ‘:react-native-linear-gradient:debugCompileClasspath’. Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available.

this error fail for all libraries

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 18
  • Comments: 26 (6 by maintainers)

Most upvoted comments

Hello, I ran into the same issue after upgrading to RN 0.71 and I found a workaround that worked for me:

  • Open android/app/build.gradle BE CAREFUL IT’S NOT android/build.gradle!!!
  • Add apply plugin: "com.facebook.react" like this:
 apply plugin: "com.android.application"
+apply plugin: "com.facebook.react"

 import com.android.build.OutputFile
 ...
  • Rebuild your application, it should works

However, this warning (shown when building) makes me feel this will break soon…

##############################

Using react.gradle in your project is deprecated! You should move to "apply plugin: com.facebook.react"
react.gradle is going to be removed in a future React Native project and your project will not build anymore.
You can use the template as a reference:
https://github.com/facebook/react-native/blob/main/template/android/app/build.gradle

##############################

Maybe we can completely replace the android/app/build.gradle file by this one, I didn’t tested it because

I also facing same issue, but for my case I think it’s because this library react-native-mmkv-storage

Error:

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find any matches for com.facebook.react:react-android:+ as no versions of com.facebook.react:react-android are available.
     Searched in the following locations:
       - file:/Users/cryptokun/Documents/react-native/MuloApp/node_modules/react-native/android/com/facebook/react/react-android/maven-metadata.xml
       - file:/Users/cryptokun/Documents/react-native/MuloApp/node_modules/jsc-android/dist/com/facebook/react/react-android/maven-metadata.xml
       - https://dl.google.com/dl/android/maven2/com/facebook/react/react-android/maven-metadata.xml
       - https://www.jitpack.io/com/facebook/react/react-android/maven-metadata.xml
     Required by:
         project :app > project :react-native-mmkv-storage

I have also faced the same problem react-native: 0.71.8 and I have added apply plugin: "com.facebook.react" to app/build.gradle and getting this error:

* What went wrong:
A problem occurred evaluating project ':app'.
> Plugin with id 'com.facebook.react' not found.

I appreciate any help 🙏

same issues on my side

I also facing same issue, but for my case I think it’s because this library react-native-mmkv-storage

Error:

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find any matches for com.facebook.react:react-android:+ as no versions of com.facebook.react:react-android are available.
     Searched in the following locations:
       - file:/Users/cryptokun/Documents/react-native/MuloApp/node_modules/react-native/android/com/facebook/react/react-android/maven-metadata.xml
       - file:/Users/cryptokun/Documents/react-native/MuloApp/node_modules/jsc-android/dist/com/facebook/react/react-android/maven-metadata.xml
       - https://dl.google.com/dl/android/maven2/com/facebook/react/react-android/maven-metadata.xml
       - https://www.jitpack.io/com/facebook/react/react-android/maven-metadata.xml
     Required by:
         project :app > project :react-native-mmkv-storage

I just faced the same issues,

it turns out React Native MMKV Storage > 2.5.1 isn’t compatible with React Native below 0.71

Checkout the breaking changes: https://github.com/mrousavy/react-native-mmkv/releases

We have the same issue

I’m upgrading from react-native 0.70.0 to 0.71.0.

First I was getting a Could not get unknown property 'hermesEnabled' for project ':app' of type org.gradle.api.Project. which was ‘fixed’ adding hermesEnabled=true to gradle.properties.

Then I started seeing the Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available. to fix it I added the plugin: "com.facebook.react" to app/build.gradle

What I’m now seeing is this > Plugin with id ‘com.facebook.react’ not found. which I’m not sure how to fix.

I have also faced the same problem react-native: 0.71.8 and I have added apply plugin: "com.facebook.react" to app/build.gradle and getting this error:

* What went wrong:
A problem occurred evaluating project ':app'.
> Plugin with id 'com.facebook.react' not found.

I appreciate any help 🙏

Same happened with me, any updates regarding this?

https://react-native-community.github.io/upgrade-helper/?from=0.68.5&to=0.71.0 Update the package.json and app/build.gradle file according to the changes