NetrisTV / ti.exoplayer

A native control for playing videos for Titanium. Based on Google ExoPlayer, using Titanium.Media.VideoPlayer API.
Other
17 stars 6 forks source link

Gradle issue with TiSDK 10.1.1.GA #14

Open deckameron opened 2 years ago

deckameron commented 2 years ago

Hi @drauggres,

Since I updated my TiSDK to 10.1.1.GA, I haven't been able to use Exoplayer anymore.

[ERROR] [GRADLE] > Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
[ERROR] [GRADLE]    > Could not find com.google.android.exoplayer:exoplayer:2.9.6.
[ERROR] [GRADLE]      Searched in the following locations:
[ERROR] [GRADLE]        - https://dl.google.com/dl/android/maven2/com/google/android/exoplayer/exoplayer/2.9.6/exoplayer-2.9.6.pom
[ERROR] [GRADLE]        - https://repo.maven.apache.org/maven2/com/google/android/exoplayer/exoplayer/2.9.6/exoplayer-2.9.6.pom
[ERROR] [GRADLE]    > Could not find com.google.android.exoplayer:extension-ima:2.9.6.
[ERROR] [GRADLE]      Searched in the following locations:
[ERROR] [GRADLE]        - https://dl.google.com/dl/android/maven2/com/google/android/exoplayer/extension-ima/2.9.6/extension-ima-2.9.6.pom
[ERROR] [GRADLE]        - https://repo.maven.apache.org/maven2/com/google/android/exoplayer/extension-ima/2.9.6/extension-ima-2.9.6.pom

Do you believe it has anything to do with Google shutting jcenter down?

Thank you!

drauggres commented 2 years ago

Hi.

From a quick search I gathered that they stoped publishing builds to jcenter (and looks like removed old). You can find details in the explayer project. For sure it has nothing to do with TiSDK.

I tried to add other repo like this and was able to build the module:

diff --git a/android/build.gradle b/android/build.gradle
index 68caee9..32dd518 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -3,6 +3,9 @@ def exoPlayerVersion = '2.9.6'
 repositories {
        google()
        jcenter()
+       maven {
+           url "https://mvnrepository.com/"
+       }
 }

 dependencies {

Let me know if it works for you.

deckameron commented 2 years ago

Thank you very much for your attention. :-) I will give a try.

deckameron commented 2 years ago

Hi.

From a quick search I gathered that they stoped publishing builds to jcenter (and looks like removed old). You can find details in the explayer project. For sure it has nothing to do with TiSDK.

I tried to add other repo like this and was able to build the module:

diff --git a/android/build.gradle b/android/build.gradle
index 68caee9..32dd518 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -3,6 +3,9 @@ def exoPlayerVersion = '2.9.6'
 repositories {
        google()
        jcenter()
+       maven {
+           url "https://mvnrepository.com/"
+       }
 }

 dependencies {

Let me know if it works for you.

I couldn't make it work with "https://mvnrepository.com/" but it worked with maven { url 'https://repo.jenkins-ci.org/public/' }

Thank you once more. :-)

drauggres commented 2 years ago

OK, it's good to know.

Let's keep it open, since there is no fix in the repo. Maybe I will upgrade exoplayer version later and fix this properly, if Titanium survies.

m1ga commented 2 years ago

Just got my issue fixed in https://github.com/HamidrezaAmz/MagicalExoPlayer and it can be used again. It's a wrapper around Exoplayer and uses version 2.15.0. I have a simple player module working, will upload that soon. Perhaps it's an "easier to maintain" alternative for simple video/audio players.

edit: https://github.com/m1ga/ti.exoplayer put it there already

deckameron commented 2 years ago

Hi @drauggres!

This combination made the App compile again. :-D

repositories {
    google();
    maven { url 'https://jitpack.io' }
    jcenter()
    mavenCentral()
    flatDir {
        dirs 'libs'
    }
}