How to add and use third party git libraries in JetPack compose UI android

Tried adding the following steps but couldn’t use the third-party UI component in the jetpack,

  1. Add maven { url ‘https://jitpack.io’ } in build.gradle
  2. Add dependency in app.gradle
  3. Tried to use the component in UI

I’m having exactly the same issue, did you find a resolution for this? Seems git libraries just don’t work in compose, I have the same setup as you, regarding the maven reference:

repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io' }
}
  • What went wrong:
    Execution failed for task ‘:app:mergeDebugNativeLibs’.

Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’.
Could not find com.github.jeziellago:compose-markdown:0.2.6.
Searched in the following locations:

Required by:
project :app

Looking at the specific reference:

https://jcenter.bintray.com/com/github/jeziellago/compose-markdown/0.2.6/compose-markdown-0.2.6.pom

This gives a 403 forbidden, which is probably the issue

after few days of finding, finally I found the solution. in the settings.gradle file add in

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = uri(“https://jitpack.io” ) } ----> add this if want to use jitpack libraries
//jcenter() // Warning: this repository is going to shut down soon
}
}
rootProject.name = “ERPLite”
include ‘:app’

have fun.

1 Like