android-issue-reporter icon indicating copy to clipboard operation
android-issue-reporter copied to clipboard

Failed to Resolve Dependency: android-issue-reporter Version 1.4.2 Not Found

Open D4rK7355608 opened this issue 1 year ago • 6 comments

Describe the bug

The latest version 1.4.2 of the android-issue-reporter library is not working as expected. The error message is: "Failed to resolve: com.heinrichreimersoftware:android-issue-reporter:1.4.2".

Reproduce

Steps to reproduce the behavior:

  1. Add the library with version 1.4.2.
  2. Try to build the project.
  3. See the error "Failed to resolve: com.heinrichreimersoftware:android-issue-reporter:1.4.2".

Expected behavior

The project should build successfully without any errors when using version 1.4.2 of the android-issue-reporter library.

Stack trace / screenshots

Unfortunately, I don't have a stack trace or screenshots at the moment.

Device

  • Device: [Not needed]
  • OS: [Not needed]
  • Browser: [Not needed]
  • Version: [Not needed]

Additional context

This issue started occurring after updating the library to version 1.4.2. The previous version 1.3.1 was working fine and is present on the Maven repository. However, version 1.4.2 is on JitPack, which could be causing the issue. It seems that the project is not able to resolve the dependency from JitPack, even after adding JitPack to the project's build files. A potential solution could be to provide an updated version of the dependency on both Maven and JitPack.

D4rK7355608 avatar Jan 11 '24 08:01 D4rK7355608

After rewriting the settings.gradle.kt file with a better arrangement and a new syntax for the JitPack repo, that error disappeared. It’s no longer there.

It looks like it got the dependency. Here is the structure from the settings.gradle:

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

But the repo doesn’t seem to be recognized due to some more issues related to unresolved classes and commands.

Here is a list of some errors:

  • Unresolved reference: IssueReporterLauncher and can’t be imported
  • Unresolved reference: IssueReporterActivity

I will take a closer look at the project and check what the problem is. Maybe it’s because of my project. But I will also take a look at the library on GitHub and contribute if I can.

D4rK7355608 avatar Jan 11 '24 08:01 D4rK7355608

Here is the structure from the settings.gradle:

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

Did the snippet from the readme (a simplified version of the above) not work?

dependencyResolutionManagement {
    repositories {
        maven(url = "https://jitpack.io")
    }
}

But the repo doesn’t seem to be recognized due to some more issues related to unresolved classes and commands.

Here is a list of some errors:

* Unresolved reference: IssueReporterLauncher and can’t be imported

* Unresolved reference: IssueReporterActivity

You probably need to import the classes com.heinrichreimersoftware.androidissuereporter.IssueReporterLauncher and/or com.heinrichreimersoftware.androidissuereporter.IssueReporterActivity. Normally, the IDE should suggest the import automatically. But we could add the explicit import to the readme.

janheinrichmerker avatar Jan 11 '24 08:01 janheinrichmerker

The explicit import doesn't have any influence and the classes don't seem to be recognized. The project has many issues.

The first reason I think the dependency has issues is related to the fact that it can't be fully implemented in the project. This is the reason why I actually can't import the classes even if I try to add them manually. This could be due to the fact that it isn't showing any error when it is imported with the:

       maven {
            setUrl("https://jitpack.io")
        }

But by adding the next code it can't find it:

dependencyResolutionManagement {
    repositories {
        maven(url = "https://jitpack.io")
    }
}

Another reason I think this is the case is because the project can be found in two places, on Maven and JitPack, and this could lead to a misinterpretation of this repo. As I said earlier, the version on Maven is 1.3.1 and on JitPack, it's 1.4.2.

The versions 1.4 and 1.4.1 cannot be imported as well because of the com.github.aakira:expandable-layout. One interesting thing is that on version 1.4 and 1.4.1 it wants to be added the dependecy com.github.aakira:expandable-layout manually because it can't find it. The version of com.github.aakira:expandable-layout is 1.5.0 and the latest one is 1.6.0. Even with this, the expandable layout dependency is very old and outdated, leading to some incompatibility issues. This leads me to think that the issues could be related to this, even if it isn't shown in the build log.

D4rK7355608 avatar Jan 11 '24 09:01 D4rK7355608

I just bumped the dependency to 1.4.2 on a project and it works just fine.

simonpoole avatar Jan 26 '24 17:01 simonpoole

I just bumped the dependency to 1.4.2 on a project and it works just fine.

I would note that it doesn't actually work, my bad. Looking at jitpack the main issue seems to be that there is no actual aar file there, just the sources: https://jitpack.io/com/heinrichreimersoftware/android-issue-reporter/1.4.2/

simonpoole avatar Aug 07 '24 20:08 simonpoole