Reputation: 259
Background: I am trying to setup RNUILib on a react-native project but it wont build. I followed the instructions from the official guide.
Environment: Android/Windows
Here's my dependencies:
@react-native-community/blur : 3.6.0
@react-native-community/datetimepicker : 3.5.2
@react-native-community/masked-view : 0.1.11
@react-native-community/netinfo : 6.0.1
@react-native-picker/picker : 1.16.7
@react-navigation/drawer : 6.1.4
@react-navigation/native : 6.0.2
react: 17.0.2
react-native: 0.65.1
react-native-gesture-handler : 1.10.3
react-native-reanimated : 2.3.0-alpha.2
react-native-safe-area-context : 3.3.0
react-native-screens : 3.6.0
react-native-ui-lib : 5.30.0
Error log from react-native run-android
command:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.eightbitlab:blurview:1.6.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/eightbitlab/blurview/1.6.3/blurview-1.6.3.pom
- https://repo.maven.apache.org/maven2/com/eightbitlab/blurview/1.6.3/blurview-1.6.3.pom
- file:/C:/Users/vfvic/.m2/repository/com/eightbitlab/blurview/1.6.3/blurview-1.6.3.pom
- file:/D:/_react-native/CBTracker2/node_modules/react-native/android/com/eightbitlab/blurview/1.6.3/blurview-1.6.3.pom
- file:/D:/_react-native/CBTracker2/node_modules/jsc-android/dist/com/eightbitlab/blurview/1.6.3/blurview-1.6.3.pom
- https://www.jitpack.io/com/eightbitlab/blurview/1.6.3/blurview-1.6.3.pom
Required by:
project :app > project :react-native-community_blur
As I have mentioned, I have performed all the steps in the Setup guide, including the linking of @react-native-community/blur
.
Upvotes: 7
Views: 4042
Reputation: 78
update react-native.config.js
file If you are using this package on iOS only
module.exports = {
...
dependencies: {
'@react-native-community/blur': {
platforms: {
android: null,
},
},
},
...
};
Upvotes: 0
Reputation: 46
late but hope it will help someone, update android/build.gradle like below
allprojects {
repositories {
....rest
jcenter() {
content {
includeModule("com.eightbitlab", "blurview")
}
}
}
}
Upvotes: 1
Reputation: 259
Apparently, this is due to com.eightbitlab:blurview being only available from jcenter which is required by react-native-community_blur.
I've added jcenter()
in my build.gradle file and it's now working fine.
allprojects {
repositories {
jcenter()
google()
mavenCentral()
mavenLocal()
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")
}
maven { url 'https://www.jitpack.io' }
}
}
Upvotes: 18
Reputation: 788
According officials, just try https://github.com/Kureev/react-native-blur/issues/444
Upvotes: 0