EinfachHans / cordova-plugin-advanced-imagepicker

Cordova Plugin for an advanced (multiple) ImagePicker
29 stars 48 forks source link

(bug): Android build fails - jcenter() dependency problem #29

Closed tbuckel closed 9 months ago

tbuckel commented 2 years ago

Bug Report

Current Behavior:

I've tried adding V1.5.4 and master to my Cordova10 project. In both cases the build fails as Android is unable to resolve the dependencies gun0912.ted:tedpermission-rx2:2.2.2 and gun0912.ted:tedonactivityresult-rx2:1.0.6.

Expected Behavior:

Successful build

Steps to reproduce:

cordova plugin add https://github.com/EinfachHans/cordova-plugin-advanced-imagepicker#V1.5.4
cordova build android

Screenshots:

* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find gun0912.ted:tedpermission-rx2:2.2.2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/gun0912/ted/tedpermission-rx2/2.2.2/tedpermission-rx2-2.2.2.pom
       - https://repo.maven.apache.org/maven2/gun0912/ted/tedpermission-rx2/2.2.2/tedpermission-rx2-2.2.2.pom
       - https://maven.google.com/gun0912/ted/tedpermission-rx2/2.2.2/tedpermission-rx2-2.2.2.pom
       - file: OMITTED
     Required by:
         project :app > io.github.ParkSangGwon:tedimagepicker:1.2.2
   > Could not find gun0912.ted:tedonactivityresult-rx2:1.0.6.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/gun0912/ted/tedonactivityresult-rx2/1.0.6/tedonactivityresult-rx2-1.0.6.pom
       - https://repo.maven.apache.org/maven2/gun0912/ted/tedonactivityresult-rx2/1.0.6/tedonactivityresult-rx2-1.0.6.pom
       - https://maven.google.com/gun0912/ted/tedonactivityresult-rx2/1.0.6/tedonactivityresult-rx2-1.0.6.pom
       - file: OMITTED
     Required by:
         project :app > io.github.ParkSangGwon:tedimagepicker:1.2.2

Environment information:

Additional information

Looks like the missing dependencies are in the not retired jcenter repository (https://blog.gradle.org/jcenter-shutdown) and cannot be found in mavenCentral. Only newer versions are in mavenCentral.

jon-88 commented 2 years ago

I solved in this way:

repositories {
  google()
  mavenCentral()
  jcenter()
}

dependencies {
    implementation 'io.github.ParkSangGwon:tedimagepicker:1.2.2'
}
itbeyond commented 2 years ago

Having just installed this plugin and migrating my project to cordova-android 10.1.1, I can confirm the fix above by @jon-88 does solve the compilation errors caused by the missing dependency.