Skip to content
Advertisement

added library to my custom library could not be found

I built an android library and added a library to it for a custom rating bar. used it in my library and everything was ok until i added my library to an empty app for test. then I get this error while trying to build the app.

… Execution failed for task ‘:app:checkDebugAarMetadata’.

Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’. Could not find com.github.giswangsj:AndRatingBar:1.0.5. Searched in the following locations: – https://dl.google.com/dl/android/maven2/com/github/giswangsj/AndRatingBar/1.0.5/AndRatingBar-1.0.5.pomhttps://repo.maven.apache.org/maven2/com/github/giswangsj/AndRatingBar/1.0.5/AndRatingBar-1.0.5.pomhttps://maven.google.com/com/github/giswangsj/AndRatingBar/1.0.5/AndRatingBar-1.0.5.pomhttp://xxx.xxx1.xxxx.xxx:xxxxx/artifactory/libs-release-local/com/github/giswangsj/AndRatingBar/1.0.5/AndRatingBar-1.0.5.pom Required by: project :app > xxx.xxx.xxxdk:xxx:1.0.6 …

It could not find the rate bar library I added to my library.

here is how I added my library to the app

root gradle file

repositories{ … maven { url “http://xxx.xxx.xxx.xxx:xxxx/artifactory/libs-release-local” } … }

http://xxx.xxx.xxx.xxx:xxxx/artifactory is where I stored my library

app build.gradle file

dependencies { … implementation ‘xxx.xxxx.xxxx:xxxxx:1.0.6’ … }

Advertisement

Answer

Add AndRatingBar dependency in your app as well, That will fix the issue as your repository (http://xxxx.xx:xxxxx/artifactory) is not having AndRatingBar hosted to resolve and also the AndRatingBar is neither on google maven server or apache maven server but jitpack server. If you would have hosted your library on maven server with pom defining the AndRatingBar then you would have not needed to add the dependency in app separately.

Advertisement