ncapdevi / FragNav

An Android library for managing multiple stacks of fragments
1.5k stars 220 forks source link

Failed to resolve: com.ncapdevi:frag-nav:3.2.0 (jcenter sunset) #255

Open t1d opened 2 months ago

t1d commented 2 months ago

Dependency Resolution Issue: frag-nav

Background: On August 15, 2024, Jcenter was officially sunset, redirecting all its content to MavenCentral. However, the following dependency is not available on MavenCentral and cannot be resolved:

I wanna made this insights available for everyone because as seen in the repository there are still people using frag-nav

Any guidance or suggestions would be appreciated!

ncapdevi commented 2 months ago

Hi @t1d yes, if I can get some feedback that the library is still in active use, then taking a weekend to migrate things over seems like the right call, and something that I could do.

GerardBizagi commented 2 months ago

Hi @ncapdevi, we have the same problem and we continue using the library in version 2.4.0, we hope to continue using it, thank you.

bryancubillos commented 2 months ago

Its impossible build the pipeline in Azure with this, we use 2.4.0 version and don't works

headsmanxxx commented 2 months ago

Hi @ncapdevi, we have the same issue and we need this library in any way. Thank you!

Failed to transform FragNav-3.3.0.aar (com.github.ncapdevi:FragNav:3.3.0) to match attributes {artifactType=android-databinding, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}. Could not find FragNav-3.3.0.jar (com.github.ncapdevi:FragNav:3.3.0). Searched in the following locations: https://jitpack.io/com/github/ncapdevi/FragNav/3.3.0/FragNav-3.3.0.aar https://jitpack.io/com/github/ncapdevi/FragNav/3.3.0/FragNav-3.3.0.jar

PaulineKlein commented 2 months ago

Hi @ncapdevi, we have the same issue when building with Github actions. We got the same error as @headsmanxxx (we are also using version 3.3.0) Thank you 🙏

amatsegor commented 2 months ago

Hi @ncapdevi , can confirm it is in use (3.3.0), I would be extremely grateful if you'd migrate it. Thank you!

thorre commented 2 months ago

Hi @ncapdevi we have the same issue and our release pipeline is now down :-( We use version 3.3.0

eggplants commented 2 months ago

FragNav build is failing. https://jitpack.io/com/github/ncapdevi/FragNav/3.3.0/build.log

android-junit5 has to be updated to 1.7.1.0 or higher. https://github.com/ncapdevi/FragNav/blob/498317c96c4436edd219f2bc10aa9e4ec3a94720/build.gradle#L12

https://jcenter.bintray.com/de/mannodermaus/gradle/plugins/android-junit5/ ↓ redirect https://repo1.maven.org/maven2/de/mannodermaus/gradle/plugins/android-junit5/

t1d commented 2 months ago

Hi All, thanks for those replies. So I'm seeing this Issue getting a lot of traction, which confirms, that the lib is still in use. So I'm investing a few hours and see if i can fix the problem.

Enjot commented 2 months ago

This Udemy course uses this library and for now it's impossible to build a GitHub project that is linked to this course so students can't do exercises that are included there.

abhishekgupta-mset commented 2 months ago

Hi @ncapdevi we have the same issue and our release pipeline is now down :-( We use version 3.3.0

mohammadhaseeb-mset commented 2 months ago

Hi @ncapdevi we are also facing the same issue causing our release pipeline resulting in failure. We are using version 3.3.0

muhammadsabeelahmed-mset commented 2 months ago

Hii @ncapdevi we are also facing same issue, our pipeline is down now.. using 3.3.0.

eggplants commented 2 months ago

@abhishekgupta-mset @mohammadhaseeb-mset @muhammadsabeelahmed-mset You can fork and modify this repo under Apache License freely.

davit-zakaryan commented 2 months ago

Hey, the same issue here. Who can help with this? I am already thinking about forking the lib and put it into the project!!

TonyLead commented 2 months ago

also have problem

TonyLead commented 2 months ago

maybe author can share aar ?

A7ak commented 2 months ago

@ncapdevi I have added aar and jar file for 3.3.0 PR link

sunenielsen commented 2 months ago

@A7ak do you also have one for 2.4.0, as my project has not been upgraded to use version 3?

t1d commented 2 months ago

@ncapdevi I managed to make the frag-nav project running but i have issues with the demo project. I invested a few hours but did not manage to made it work. I could push the changes to a branch.

eggplants commented 2 months ago

@t1d

I could push the changes to a branch

This one? https://github.com/t1d/frag-nav-reworked

t1d commented 2 months ago

@t1d

I could push the changes to a branch

This one? https://github.com/t1d/frag-nav-reworked

Sorry haven't pushed it yet. There you go: https://github.com/t1d/FragNav/tree/misc/dump-dependencies

eggplants commented 2 months ago

@t1d Failed to build on JitPack. https://jitpack.io/com/github/t1d/FragNav/misc~dump-dependencies-8c36037dd3-1/build.log It appears that Gradle 8.2 requires Java 11, whereas some dependencies require Java 8.

error ``` FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'build'. > Could not resolve all files for configuration ':classpath'. > Could not resolve com.android.tools.build:gradle:8.2.2. Required by: project : > No matching variant of com.android.tools.build:gradle:8.2.2 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.2' but: - Variant 'apiElements' capability com.android.tools.build:gradle:8.2.2 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.2') - Variant 'javadocElements' capability com.android.tools.build:gradle:8.2.2 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.2') - Variant 'runtimeElements' capability com.android.tools.build:gradle:8.2.2 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.2') - Variant 'sourcesElements' capability com.android.tools.build:gradle:8.2.2 declares a component for use during runtime, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.2') > Could not resolve de.mannodermaus.gradle.plugins:android-junit5:1.11.0.0. Required by: project : > No matching variant of de.mannodermaus.gradle.plugins:android-junit5:1.11.0.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.2' but: - Variant 'apiElements' capability de.mannodermaus.gradle.plugins:android-junit5:1.11.0.0 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.2') - Variant 'runtimeElements' capability de.mannodermaus.gradle.plugins:android-junit5:1.11.0.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.2') * 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 1s Running: ./gradlew -Pgroup=com.github.t1d -Pversion=misc~dump-dependencies-8c36037dd3-1 publishToMavenLocal Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2 ```
eggplants commented 2 months ago

@t1d Try:

https://github.com/t1d/FragNav/blob/misc/dump-dependencies/frag-nav/build.gradle#L62-L65

To:

java {
-    sourceCompatibility = JavaVersion.VERSION_1_8
-    targetCompatibility = JavaVersion.VERSION_1_8
+    sourceCompatibility = JavaVersion.VERSION_11
+    targetCompatibility = JavaVersion.VERSION_11
}

References: https://docs.gradle.org/current/javadoc/org/gradle/api/JavaVersion.html#VERSION_11 https://stackoverflow.com/questions/72117858

A7ak commented 1 month ago

use this fix https://medium.com/@ag7aka/how-to-find-and-integrate-a-library-from-cache-in-android-jcenter-shudown-63682c8535f6

A7ak commented 1 month ago

@A7ak do you also have one for 2.4.0, as my project has not been upgraded to use version 3? https://github.com/ncapdevi/FragNav/issues/255#issuecomment-2377510790

bryancubillos commented 1 month ago

Any update?

voghDev commented 1 month ago

Hi! thanks for the active work in this library! We're still using version 3.3.0 in our App. 1M+ downloads 🙂 It'd be awesome to have an available dependency. For the moment we'll use the jar and the aar

voghDev commented 1 month ago

This is the final dependency we've used after some failed attempts with other combinations:

root build.gradle:

allprojects {
  repositories {
    google()
    mavenCentral()
   ...
    maven(url = "https://jitpack.io") // <-- Make sure you have this dependency added
  }
}

app/build.gradle

implementation "com.github.ncapdevi:fragnav:3.3.0"

it is currently working for us. I hope it does for you too

jordizspmobile commented 3 weeks ago

Solved! Add the next code in settings.gradle:

import org.gradle.api.initialization.resolve.RepositoriesMode

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url "https://maven.google.com" }
        maven { url "https://jitpack.io" }
    }
}

Remove from root build.gradle:

allprojects {
   // Remove repositories from here
    repositories { -> Removed
        google()
        mavenCentral()
        maven { url "https://maven.google.com" }
        maven { url "https://jitpack.io" }
    }
   ....

Use your dependency like:

implementation "com.github.ncapdevi:fragnav:3.3.0"
Chbilalramzan commented 1 week ago

@jordizspmobile @voghDev upgraded it to 3.3.0 worked for me. Thanks