3

The problem is, I previously used a github repository (https://github.com/kenglxn/QRGen) as my dependency:

compile 'com.github.kenglxn.QRGen:android:2.4.0'

It worked fine but now i have forked the repository, made some changes and I'm trying to use my repository as dependency, my repository: https://github.com/prasenjeetpaul/QRGen, I'm trying as:

compile 'com.github.prasenjeetpaul.QRGen:android:2.4.0'

I have sync the project many times but couldn't use my repository code, even after removing the old dependency it is still using the old code but not the new code from my github repository.

Is there a way to remove the old dependency code and use my new repository code??

Please help!

Prasenjeet Paul
  • 121
  • 1
  • 9
  • 2
    It doesn't work like that mate. Read more [here](https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en) – Vucko Jan 26 '18 at 19:46
  • Thanks for sharing the info @Vucko . I didn't knew this back-end process for creating a dependency. Your comment helped me a lot !! – Prasenjeet Paul Jan 27 '18 at 13:46

2 Answers2

1

Uploading your files to GitHub will not make your code to be available to be included as a dependency. First, make sure that your project is a library, and follow these steps to upload your library to Bintray's jcenter() repository so that your library can be included as a dependency.

Siddharth Venu
  • 1,318
  • 13
  • 26
1

I prefer to use bintray to upload my libs to jcenter repository but the process a little bit complicated so you may use jitpack to publish new dependency immediately

Just add jitpack repo link to root build.gradle and it will work

allprojects {
 repositories {
  ...
  maven { url 'https://jitpack.io' } // add this line
 }
}
Andrew
  • 1,383
  • 7
  • 21