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

Could not find com.yqritc:android-scalablevideoview:1.0.4 #2454

Closed
imshreyansh opened this issue Aug 18, 2021 · 54 comments
Closed

Could not find com.yqritc:android-scalablevideoview:1.0.4 #2454

imshreyansh opened this issue Aug 18, 2021 · 54 comments

Comments

@imshreyansh
Copy link

imshreyansh commented Aug 18, 2021

Bug

React native 0.65.0 build is failing on Android after installing react native video

Platform

Which player are you experiencing the problem on:

  • Android ExoPlayer
  • Android MediaPlayer

Environment info

Library version: 5.1.1

Steps To Reproduce

  1. create a project of React Native version 0.65.0
  2. install react-native-video
    3.build the project
    ...

Expected behaviour

1.The build should successfully complete
2.The app should be installed in the simulator/device
3.react-native-video should work properly.
thumbnail_IMG-7191

@timmywil
Copy link

I think this has to do with React Native's recent migration away from jcenter, which all React Native projects will start doing as well. The dependency itself seems to only be available on jcenter and it looks pretty old (https://github.com/yqritc/Android-ScalableVideoView). RNV will have to deal with this somehow. I wonder if it would be possible to drop this dependency completely. If not that, then fork it and make it available on maven central.

@timmywil
Copy link

timmywil commented Aug 18, 2021

For now, the workaround is probably to add back jcenter to your build.gradle. That's not a permanent solution as jcenter will not be available forever.

timmywil added a commit to spokestack/react-native-spokestack-tray that referenced this issue Aug 18, 2021
@Degn
Copy link

Degn commented Aug 20, 2021

I cannot get it to work by including jcenter. Any suggestions to make this run again?

@timmywil
Copy link

@Degn I think the only explanation for that is that you didn't add jcenter correctly, or there's some caching going on.

@moigamijunior
Copy link

I have the same issue. Even with jcenter the problem wasn't solved.

@moigamijunior
Copy link

I solved the problem just putting the jcenter() in "settings.gradle".

@imshreyansh
Copy link
Author

jcenter() is deprecated and no longer be maintained in future release of react native.

@lucswart
Copy link

I have the same issue and hope that the library can make it available on maven central... Can't build at all now.

@Zestpond
Copy link

same issue when I updated react-native: 0.65.1

@kevmmdev
Copy link

I solved the problem just putting the jcenter() in "settings.gradle".

this does not work for me, can I see your sampe code?

@kevmmdev
Copy link

this is the one that worked for me https://stackoverflow.com/a/68841906

@kingcheng2000
Copy link

I think this has to do with React Native's recent migration away from jcenter, which all React Native projects will start doing as well. The dependency itself seems to only be available on jcenter and it looks pretty old (https://github.com/yqritc/Android-ScalableVideoView). RNV will have to deal with this somehow. I wonder if it would be possible to drop this dependency completely. If not that, then fork it and make it available on maven central.

Have you solved the issue ? I still got the same error in my project! Would you like to provide more information about how to solve this issue ?thanks

@imshreyansh
Copy link
Author

You can add jcenter()
Inside android/build.gradle file

@kornelijussl
Copy link

this is the one that worked for me https://stackoverflow.com/a/68841906

Gold!

@wbroek
Copy link

wbroek commented Sep 6, 2021

this is the one that worked for me stackoverflow.com/a/68841906

Because jCenter is removed from latest react native and com.yqritc:android-scalablevideoview is only published there you need to add jCenter again as a repository but I would advice to define the package so other dependencies are not fetched/taken from jCenter anymore. Because jCenter does not allow any updates anymore of any package all other packages should be taken from mavenCentral for example.

You can add jcenter to android/build.gradle like this:

allprojects {
    repositories {
        .... # Keep the rest
        jcenter() {
            content {
                includeModule("com.yqritc", "android-scalablevideoview")
            }
        }
    }
}

Hopefully somebody updates android-scalablevideoview to use another repository

@fredpereirajr
Copy link

Dear, I tried for the new version of react native (0.65.1) and it's working. But remembering that you must put the jcenter() inside: YourProject / android / build.grandle

@coderkhalide
Copy link

this is the one that worked for me https://stackoverflow.com/a/68841906

thanks a loooooooot, it solved my issue

@arnavmundkur95
Copy link

arnavmundkur95 commented Oct 13, 2021

Currently on React Native version 0.64.2, and neither adding:

jcenter() {
content {
includeModule("com.yqritc", "android-scalablevideoview")
}
}
to the android/build.gradle file, nor adding jcenter() back to repositories as recommended by https://stackoverflow.com/a/68841906 worked for me

@SunyanLBJ23
Copy link

这是对我有用的那个stackoverflow.com/a/68841906

因为 jCenter 已从最新的 React Native 中删除并且com.yqritc:android-scalablevideoview仅在那里发布,所以您需要再次添加 jCenter 作为存储库,但我建议定义该包,以便不再从 jCenter 获取/获取其他依赖项。因为 jCenter 不再允许任何包的任何更新,所以其他包应该从 mavenCentral 中获取,例如。

您可以android/build.gradle像这样添加 jcenter :

allprojects {
    repositories {
        .... # Keep the rest
        jcenter() {
            content {
                includeModule("com.yqritc", "android-scalablevideoview")
            }
        }
    }
}

希望有人更新 android-scalablevideoview 以使用另一个存储库

This solves my problem,☺

@Hello-Zeze
Copy link

Is there another workaround for this issue? All the solutions suggested above don't seem to work anymore.
This is what I have in my build.gradle:

allprojects {
    repositories {        
        mavenCentral()
        mavenLocal()
        jcenter() 
        maven() {
            url 'https://repo.spring.io/plugins-release/'
            content {
                includeModule("com.yqritc", "android-scalablevideoview")
            }
        }
    }
}

@Brumor
Copy link

Brumor commented Oct 25, 2021

That fix worked for me too, is there any plans to move android-scalablevideoview to mavenCentral?

@Hello-Zeze
Copy link

That fix worked for me too, is there any plans to move android-scalablevideoview to mavenCentral?

@Brumor can you confirm your version of RN?

@gwmccull
Copy link

@Hello-Zeze the code snippet that you posted there doesn't match the one posted above. The content portion should be in jcenter, not in maven

@Shihaburabbi
Copy link

You can add jcenter to android/build.gradle like this:

jcenter() //add this line

@peterrus
Copy link

@Shihaburabbi it's best to only pull specific packages from jcenter(), like this: #2454 (comment)

@umarmansuri
Copy link

I face the same issue and i used this solution that works for me

https://stackoverflow.com/a/68841906

@arancauchi
Copy link

jitpack.io has a mirror which includes this missing dependency.
I would suggest this over using jcenter, since it appears to be very flakey now

https://jitpack.io/#yqritc/Android-ScalableVideoView

@edritech93
Copy link

same issue for me

@zain-khalid
Copy link

I solved the problem just putting the jcenter() in "settings.gradle".

this does not work for me, can I see your sample code?

It works for me as well. Thank You

Ashoat added a commit to CommE2E/comm that referenced this issue Jan 31, 2022
Summary:
Various changes that apply to Android config files for the React Native upgrade.

Note that there are three changes here from React Native 0.67:

- Fixing typo in code comment in `native/android/app/build.gradle`
- Fixing typo in code comment in `native/android/gradle.properties`
- `excludeGroup "com.facebook.react"` for `mavenCentral` in `native/android/build.gradle`

Also note that the changes to the NDK version here will necessitate that every developer installs the new NDK version here. Otherwise you will see this error when trying to run any Gradle build:

```
org.gradle.api.InvalidUserDataException: NDK not configured. Download it with SDK manager. Preferred NDK version is '21.4.7075529'.
```

Also note that I was unable to remove the `jcenter` dependency because of [this](TheWidlarzGroup/react-native-video#2454) `react-native-video` issue.

Test Plan: Built and ran the whole stack on iOS and Android across various architectures

Reviewers: palys-swm, atul

Reviewed By: palys-swm

Subscribers: benschac, Adrian, karol-bisztyga

Differential Revision: https://phabricator.ashoat.com/D2985
Ashoat added a commit to CommE2E/comm that referenced this issue Jan 31, 2022
Summary:
I initially thought that upgrading would get rid of the `jcenter` dependency. That did not work, so I had to keep the `jcenter` dependency in (see earlier diff). The issue is tracked [here](TheWidlarzGroup/react-native-video#2454).

Figured it wouldn't hurt to keep this diff, though.

Test Plan: Built and ran the whole stack on iOS and Android across various architectures

Reviewers: palys-swm, atul

Reviewed By: palys-swm

Subscribers: benschac, Adrian, karol-bisztyga

Differential Revision: https://phabricator.ashoat.com/D2995
@shyankashani
Copy link

Anybody got any updates on this situation?

@NensiKasundra
Copy link

Yes, Same Issue.

Execution failed for task ':app:mergeDebugJavaResource'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.yqritc:android-scalablevideoview:1.0.4.

jcenter is deprecated. it's not a permanent solution.

It's not available on maven.

https://dl.google.com/dl/android/maven2/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom
https://repo.maven.apache.org/maven2/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom
https://www.jitpack.io/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom

Please Update.

@filiprejmus
Copy link

There are already forks that fix that: yqritc/Android-ScalableVideoView#52 (comment)
As far as I know the fix was already merged but not published.
Could a maintainer publish please??

@MWahab8
Copy link

MWahab8 commented Apr 22, 2022

Anyone please help:
i have this error: Failed to resolve: com.yqritc:android-scalablevideoview:1.0.4

@MWahab8
Copy link

MWahab8 commented Apr 22, 2022

Please answer why this is keep appearing i have spent more than 48 hours on it now i am getting this:

Failed to resolve: com.yqritc:android-scalablevideoview:1.0.4
Show in Project Structure dialog
Affected Modules: app

@MWahab8
Copy link

MWahab8 commented Apr 22, 2022

This is my build.gradle(app):

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 32
buildToolsVersion "30.0.3"

defaultConfig {
    applicationId "com.example.letsWeTalk"
    minSdkVersion 24
    targetSdkVersion 32
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.5.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.firebase:firebase-analytics:20.1.2'
implementation 'com.google.firebase:firebase-auth:21.0.3'
implementation 'com.google.firebase:firebase-firestore:24.1.1'
implementation ('org.jitsi.react:jitsi-meet-sdk:3.10.2') { transitive = true }

}

@MWahab8
Copy link

MWahab8 commented Apr 22, 2022

and this is build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.google.gms:google-services:4.3.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
maven {
url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

@freeboub
Copy link
Collaborator

This issue is linked to this PR: #2651

@naojamg
Copy link

naojamg commented May 9, 2022

this is the one that worked for me stackoverflow.com/a/68841906

Because jCenter is removed from latest react native and com.yqritc:android-scalablevideoview is only published there you need to add jCenter again as a repository but I would advice to define the package so other dependencies are not fetched/taken from jCenter anymore. Because jCenter does not allow any updates anymore of any package all other packages should be taken from mavenCentral for example.

You can add jcenter to android/build.gradle like this:

allprojects {
    repositories {
        .... # Keep the rest
        jcenter() {
            content {
                includeModule("com.yqritc", "android-scalablevideoview")
            }
        }
    }
}

Hopefully somebody updates android-scalablevideoview to use another repository

this works great!!

@evanjmg
Copy link

evanjmg commented May 18, 2022

jcenter isn't the solution, it will be removed anyways with the latest pr #2681

@HyopeR
Copy link

HyopeR commented Jun 5, 2022

Any progress on this?

@arsimr16
Copy link

I was able to use react-native-video 5.2.0 without using jcenter by switching to the Android ExoPlayer. android-scalablevideoview is only used by the Android MediaPlayer which is being removed in version 6.x of react-native-video anyway.

  1. Add the following lines to settings.gradle to use the ExoPlayer instead of the MediaPlayer:
include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')
  1. Once I switched to the ExoPlayer, I got errors from react-native-video/android-exoplayer/build.gradle about com.google.android.exoplayer:exoplayer:2.13.2 and com.google.android.exoplayer:extension-okhttp:2.13.2 not being available. I made a patch to change both versions to 2.13.3, and my app built successfully after that.

@ShivS01
Copy link

ShivS01 commented Aug 25, 2022

Any updates on this?
jcenter works for now, but need a proper fix

@cross19xx
Copy link

As anticipated, jCenter is finally down, lol

@hassanrazaby433
Copy link

hassanrazaby433 commented Oct 31, 2022

JsCenter is down , android-scalablevideoview is not on mavenCentral, this package needs to update

@verybluebot
Copy link

verybluebot commented Oct 31, 2022

Yep jcenter seems to be finally down.
android-scalablevideoview beed forked and uploaded to JitPack. Not the best solution but maybe for now would be accepted
for this project?

@Ashoat
Copy link

Ashoat commented Oct 31, 2022

Yeah I think that change is on master and the 6.0 alphas: fd821d2

@freeboub
Copy link
Collaborator

Non, on V6 on exoplayer is supported. 5.2.1 such include similar change

@jamiembrown
Copy link

Yeah I think that change is on master and the 6.0 alphas: fd821d2

Applying that change in node_modules/react-native-video-processing/android/build.gradle got my build running again - thank you! When I have time I'll update the library, but this works for me for now and at least lets me build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests