Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build doesn't work on Android because of JCenter shut down #1039

Closed
Nodonisko opened this issue Oct 31, 2022 · 4 comments · Fixed by #1040
Closed

Build doesn't work on Android because of JCenter shut down #1039

Nodonisko opened this issue Oct 31, 2022 · 4 comments · Fixed by #1040
Labels
bug Something isn't working

Comments

@Nodonisko
Copy link
Contributor

Description

Android build fails with this exception:

* What went wrong:
Could not determine the dependencies of task ':shopify_react-native-skia:externalNativeBuildDebug'.
> Could not resolve all task dependencies for configuration ':shopify_react-native-skia:debugRuntimeClasspath'.
   > Could not resolve com.facebook.react:react-native:+.
     Required by:
         project :shopify_react-native-skia
      > Failed to list versions for com.facebook.react:react-native.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
            > Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
               > Read timed out

It seems that is because in android/build.gradle there is still jcenter() in repositories section, but it was shut down. RN already migrated react-native-community/discussions-and-proposals#331

Version

all of them

Steps to reproduce

Run android build.

Snack, code example, screenshot, or link to a repository

Not needed.

@Nodonisko Nodonisko added the bug Something isn't working label Oct 31, 2022
@Nodonisko
Copy link
Contributor Author

I prepared PR that should fix it #1040

@Nodonisko
Copy link
Contributor Author

In case anyone will need hotfix as we do you can place this to your android/build.gradle:

allprojects {
    repositories {
        // This fix should be removed once https://github.com/Shopify/react-native-skia/pull/1040 is merged
        all { ArtifactRepository repo ->
            if(repo instanceof MavenArtifactRepository){
                def url = repo.url.toString()
                if (url.startsWith('https://jcenter.bintray.com/')) {
                    remove repo
                }
            }
        }
        // end of temp fix
		......
		......

@amerllica
Copy link

Thanks dear @Nodonisko, as you said it is a temporary solution.

But in some cases like mine, I'm using ReactNativeSkia version 0.1.103-alpha, it could be a permanent solution but alongside the solution, we should use a library or trick to keep the changes of node_modules in production.

For more information I left an answer on StackOverflow.

@Nodonisko
Copy link
Contributor Author

@amerllica There is already pending PR with fix #1040 that will be permanent solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants