From a4fcde5a1bf93e32be135af286fdba6d88e29637 Mon Sep 17 00:00:00 2001 From: Li Zheng Date: Thu, 10 Nov 2022 14:40:06 +0800 Subject: [PATCH] fix React-Native Android import from node_modules directory does not working ref to https://github.com/facebook/react-native/issues/35204#issuecomment-1304740228 caused by https://github.com/facebook/react-native/issues/35210 --- android/build.gradle | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index ed5a568..9d3da82 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -20,11 +20,24 @@ buildscript { allprojects { repositories { + exclusiveContent { + filter { + includeGroup "com.facebook.react" + } + forRepository { + maven { + url "$rootDir/../node_modules/react-native/android" + } + } + } + + // maven { url 'https://maven.aliyun.com/repository/google' } + // maven { url 'https://maven.aliyun.com/nexus/content/groups/public' } mavenLocal() - maven { - // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url("$rootDir/../node_modules/react-native/android") - } + // maven { + // // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + // url("$rootDir/../node_modules/react-native/android") + // } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist")