Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading library on Maven central

I have added aar library to MavenCentral by going through this toturial

When I add my library in project it gives me this error: Module version MY_LIBRARY depends on libraries but is not a library itself

You can find my build gradle file here

I have a uploadArchives task in my build.gradle. Does anyone know why I get this error and how to fix it?

EDIT:

I figured out where was the problem. I had to add @aar in my build gradle file and now it's working. Example: compile 'com.viewpagerindicator:library:2.4.1@aar'

like image 265
Koc Avatar asked Feb 04 '26 02:02

Koc


2 Answers

I already have this kind of problem with a cyclic dependency, so maybe you can check that.

I also found this, which is similar to your problem : Android Gradle library dependency with library dependency using Nexus

It seems that was an early release bug, so maybe you can try a more recent version of graddle.

like image 114
tanou Avatar answered Feb 05 '26 19:02

tanou


I figured out where was the problem. I had to add @aar in my build gradle file and now it's working. Example: compile 'com.viewpagerindicator:library:2.4.1@aar'

like image 32
Koc Avatar answered Feb 05 '26 21:02

Koc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!