'React Native -- Could not determine the dependencies of task ':app:mergeDebugAssets'
I'm trying to run my project with the npm run android
command and it throws this error for me:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1579 file(s) to forward-jetify. Using 12 workers...
info Starting JS server...
info Installing the app...
Configuration on demand is an incubating feature.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> You must specify a URL for a Maven repository.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
what I did so far is cd
to the android folder and run ./gradlew clean
and it says BUILD SUCCESSFUL
with no error also I delete my node_module
folder and run npm install
again but no luck. I appreciate any help.
Solution 1:[1]
I had a similar error, in my case I edited my android/build.gradle
file like this:
after
...
jcenter()
add line
mavenCentral()
Don't know if it help in your case, but it worked for me
PS as I understand there is some problems with access some files at https://jcenter.bintray.com/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | luten |