Open a-mar-se opened 1 year ago
Any help on how to install https://github.com/danikula/AndroidVideoCache ?
I get the same error in React Native version 0.71.3. Is there any solution?
This usually happens when you forget to add allprojects { repositiries { maven { url } } }
as mentioned in the README to your build file.
Your android/build.gradle
file should look like:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
// [ omitted ], generated by react-native
}
allprojects { // <- you should have added this
repositories {
maven {
url "$rootDir/../node_modules/react-native-video-cache/android/libs" // <- build files for AndroidVideoCache
}
}
}
If you actually go to node_modules/react-native-video-cache/android/libs
you will find the build files for the missing android build dependency.
Hey I have already added this in the url still failing any fixes... cross verified as well the path I added seems perfect but still getting error
Hi 👋 Path to the libs suggested above, is not correct ⬆️
Here solution I found by going through the directories
allprojects {
repositories {
maven { url "$rootDir/../node_modules/react-native-video-cache-control/android/libs" }
}
}
This worked for me 🚀
Also still having this error, but it changed slightly after adding the maven repo.
Before:
* What went wrong:
Could not determine the dependencies of task ':react-native-video-cache:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':react-native-video-cache:debugCompileClasspath'.
> Could not find com.danikula:videocache:2.7.1.
Searched in the following locations:
- https://oss.sonatype.org/content/repositories/snapshots/com/danikula/videocache/2.7.1/videocache-2.7.1.pom
- https://repo.maven.apache.org/maven2/com/danikula/videocache/2.7.1/videocache-2.7.1.pom
- file:[project root was here]/node_modules/jsc-android/dist/com/danikula/videocache/2.7.1/videocache-2.7.1.pom
- https://dl.google.com/dl/android/maven2/com/danikula/videocache/2.7.1/videocache-2.7.1.pom
- https://www.jitpack.io/com/danikula/videocache/2.7.1/videocache-2.7.1.pom
- file:[project root was here]/node_modules/react-native/android/com/danikula/videocache/2.7.1/videocache-2.7.1.pom
Required by:
project :react-native-video-cache
After:
* What went wrong:
Could not determine the dependencies of task ':react-native-video-cache:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':react-native-video-cache:debugCompileClasspath'.
> Could not find com.danikula:videocache:2.7.1.
Required by:
project :react-native-video-cache
So it seems that it found something at least as it doesn't list the searched locations anymore.
I'm using expo with the following listed in the plugins
config:
[
"expo-build-properties",
{
"android": {
"extraMavenRepos": [
"../../node_modules/react-native-video-cache/android/libs"
]
}
}
],
react-native-video-cache needs the following package to work on android: Android: https://github.com/danikula/AndroidVideoCache
As it is not available, this package is also not working.
On npx react-native run-android I get this error: