diff --git a/example/android/build.gradle b/example/android/build.gradle index 3b34468..de92922 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,5 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. +def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim()) + buildscript { ext { buildToolsVersion = '30.0.2' @@ -37,4 +39,11 @@ allprojects { google() maven { url 'https://www.jitpack.io' } } + + configurations.all { + resolutionStrategy { + // Remove this override in 0.65+, as a proper fix is included in react-native itself. + force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION + } + } }