how to import your own github forked library into android studio
up vote
9
down vote
favorite
I found a nice open library on GitHub, I imported it into my Android Studio project using Gradle dependencies, but then I realized I need to make little modifications on it.
So I forked the library on my GitHub, done the modifications and asked for a pull request, but I can't wait until they approve and merge my modifications with the original code.
Is there a way to use dependencies to import my forked library (in my Github) into my Android Studio project, rather than the original library?
github android-studio gradle android-gradle android-library
add a comment |
up vote
9
down vote
favorite
I found a nice open library on GitHub, I imported it into my Android Studio project using Gradle dependencies, but then I realized I need to make little modifications on it.
So I forked the library on my GitHub, done the modifications and asked for a pull request, but I can't wait until they approve and merge my modifications with the original code.
Is there a way to use dependencies to import my forked library (in my Github) into my Android Studio project, rather than the original library?
github android-studio gradle android-gradle android-library
1
I have the same problem, but all i can think of isImport as Module
way , since you have it in your disk. I know this isnt the solution your looking for but I think this is the only way(I think) as of now.
– david
Jan 22 '16 at 6:20
add a comment |
up vote
9
down vote
favorite
up vote
9
down vote
favorite
I found a nice open library on GitHub, I imported it into my Android Studio project using Gradle dependencies, but then I realized I need to make little modifications on it.
So I forked the library on my GitHub, done the modifications and asked for a pull request, but I can't wait until they approve and merge my modifications with the original code.
Is there a way to use dependencies to import my forked library (in my Github) into my Android Studio project, rather than the original library?
github android-studio gradle android-gradle android-library
I found a nice open library on GitHub, I imported it into my Android Studio project using Gradle dependencies, but then I realized I need to make little modifications on it.
So I forked the library on my GitHub, done the modifications and asked for a pull request, but I can't wait until they approve and merge my modifications with the original code.
Is there a way to use dependencies to import my forked library (in my Github) into my Android Studio project, rather than the original library?
github android-studio gradle android-gradle android-library
github android-studio gradle android-gradle android-library
asked Feb 26 '15 at 17:33
avafab
5041522
5041522
1
I have the same problem, but all i can think of isImport as Module
way , since you have it in your disk. I know this isnt the solution your looking for but I think this is the only way(I think) as of now.
– david
Jan 22 '16 at 6:20
add a comment |
1
I have the same problem, but all i can think of isImport as Module
way , since you have it in your disk. I know this isnt the solution your looking for but I think this is the only way(I think) as of now.
– david
Jan 22 '16 at 6:20
1
1
I have the same problem, but all i can think of is
Import as Module
way , since you have it in your disk. I know this isnt the solution your looking for but I think this is the only way(I think) as of now.– david
Jan 22 '16 at 6:20
I have the same problem, but all i can think of is
Import as Module
way , since you have it in your disk. I know this isnt the solution your looking for but I think this is the only way(I think) as of now.– david
Jan 22 '16 at 6:20
add a comment |
4 Answers
4
active
oldest
votes
up vote
3
down vote
accepted
I know that this is an old post, but for someone with similar problem, if you simply want a way to change a lib and use it in your project, you can download the lib code, change it and import into your project as a module:
- Open your project in Android Studio
- Download the library (using Git, or a zip archive to unzip)
- Go to File > New > Import Module and import the library as a module
- Right-click your app in project view and select "Open Module Settings"
- Click the "Dependencies" tab and then the '+' button
- Select "Module Dependency"
- Select the imported module
- Open your build.gradle file and check that the module is listed under dependencies.
add a comment |
up vote
1
down vote
I think the previous answers are both outdated. There is actually a really easy way to do this nowadays: jitpack.io
All you need to do is.
1) add in your root build.gradle
at the end of allprojects repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
2) Add the dependency in your app build.gradle:
dependencies {
implementation 'com.github.User:Repo:Tag'
}
If you don't have any releases/tags, you can also just do com.github.User:Repo:branchname-SNAPSHOT
to build from the latest commit on that branch.
add a comment |
up vote
0
down vote
You need to add your own git respository as remote
. You can't however do this within Android Studio, according to this thread. Use the command line instead:
git remote add remoteName remoteUrl
git fetch remoteName
Then you can go to Android Studio, VCS > Git > Pull
and select your added remote repository.
5
I think you didn't get my question. I have a fork of the library in my github and it is modified. In my android studio project I imported the original library using Gradle dependencies which is without the modifications I made. Is there a way to use dependency to import the modified version of the library which is in my github?
– avafab
Feb 26 '15 at 20:18
add a comment |
up vote
0
down vote
This is how you should do it:
- Fork the repo.
- make changes and commit them
- edit the push urls to your github forked repository.
- make a release/tag
- head over to jitpack.io
- generate a url to add to your gradle file
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
I know that this is an old post, but for someone with similar problem, if you simply want a way to change a lib and use it in your project, you can download the lib code, change it and import into your project as a module:
- Open your project in Android Studio
- Download the library (using Git, or a zip archive to unzip)
- Go to File > New > Import Module and import the library as a module
- Right-click your app in project view and select "Open Module Settings"
- Click the "Dependencies" tab and then the '+' button
- Select "Module Dependency"
- Select the imported module
- Open your build.gradle file and check that the module is listed under dependencies.
add a comment |
up vote
3
down vote
accepted
I know that this is an old post, but for someone with similar problem, if you simply want a way to change a lib and use it in your project, you can download the lib code, change it and import into your project as a module:
- Open your project in Android Studio
- Download the library (using Git, or a zip archive to unzip)
- Go to File > New > Import Module and import the library as a module
- Right-click your app in project view and select "Open Module Settings"
- Click the "Dependencies" tab and then the '+' button
- Select "Module Dependency"
- Select the imported module
- Open your build.gradle file and check that the module is listed under dependencies.
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
I know that this is an old post, but for someone with similar problem, if you simply want a way to change a lib and use it in your project, you can download the lib code, change it and import into your project as a module:
- Open your project in Android Studio
- Download the library (using Git, or a zip archive to unzip)
- Go to File > New > Import Module and import the library as a module
- Right-click your app in project view and select "Open Module Settings"
- Click the "Dependencies" tab and then the '+' button
- Select "Module Dependency"
- Select the imported module
- Open your build.gradle file and check that the module is listed under dependencies.
I know that this is an old post, but for someone with similar problem, if you simply want a way to change a lib and use it in your project, you can download the lib code, change it and import into your project as a module:
- Open your project in Android Studio
- Download the library (using Git, or a zip archive to unzip)
- Go to File > New > Import Module and import the library as a module
- Right-click your app in project view and select "Open Module Settings"
- Click the "Dependencies" tab and then the '+' button
- Select "Module Dependency"
- Select the imported module
- Open your build.gradle file and check that the module is listed under dependencies.
answered Jan 12 at 7:02
Johny
1089
1089
add a comment |
add a comment |
up vote
1
down vote
I think the previous answers are both outdated. There is actually a really easy way to do this nowadays: jitpack.io
All you need to do is.
1) add in your root build.gradle
at the end of allprojects repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
2) Add the dependency in your app build.gradle:
dependencies {
implementation 'com.github.User:Repo:Tag'
}
If you don't have any releases/tags, you can also just do com.github.User:Repo:branchname-SNAPSHOT
to build from the latest commit on that branch.
add a comment |
up vote
1
down vote
I think the previous answers are both outdated. There is actually a really easy way to do this nowadays: jitpack.io
All you need to do is.
1) add in your root build.gradle
at the end of allprojects repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
2) Add the dependency in your app build.gradle:
dependencies {
implementation 'com.github.User:Repo:Tag'
}
If you don't have any releases/tags, you can also just do com.github.User:Repo:branchname-SNAPSHOT
to build from the latest commit on that branch.
add a comment |
up vote
1
down vote
up vote
1
down vote
I think the previous answers are both outdated. There is actually a really easy way to do this nowadays: jitpack.io
All you need to do is.
1) add in your root build.gradle
at the end of allprojects repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
2) Add the dependency in your app build.gradle:
dependencies {
implementation 'com.github.User:Repo:Tag'
}
If you don't have any releases/tags, you can also just do com.github.User:Repo:branchname-SNAPSHOT
to build from the latest commit on that branch.
I think the previous answers are both outdated. There is actually a really easy way to do this nowadays: jitpack.io
All you need to do is.
1) add in your root build.gradle
at the end of allprojects repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
2) Add the dependency in your app build.gradle:
dependencies {
implementation 'com.github.User:Repo:Tag'
}
If you don't have any releases/tags, you can also just do com.github.User:Repo:branchname-SNAPSHOT
to build from the latest commit on that branch.
answered Sep 8 at 17:20
user8118328
476
476
add a comment |
add a comment |
up vote
0
down vote
You need to add your own git respository as remote
. You can't however do this within Android Studio, according to this thread. Use the command line instead:
git remote add remoteName remoteUrl
git fetch remoteName
Then you can go to Android Studio, VCS > Git > Pull
and select your added remote repository.
5
I think you didn't get my question. I have a fork of the library in my github and it is modified. In my android studio project I imported the original library using Gradle dependencies which is without the modifications I made. Is there a way to use dependency to import the modified version of the library which is in my github?
– avafab
Feb 26 '15 at 20:18
add a comment |
up vote
0
down vote
You need to add your own git respository as remote
. You can't however do this within Android Studio, according to this thread. Use the command line instead:
git remote add remoteName remoteUrl
git fetch remoteName
Then you can go to Android Studio, VCS > Git > Pull
and select your added remote repository.
5
I think you didn't get my question. I have a fork of the library in my github and it is modified. In my android studio project I imported the original library using Gradle dependencies which is without the modifications I made. Is there a way to use dependency to import the modified version of the library which is in my github?
– avafab
Feb 26 '15 at 20:18
add a comment |
up vote
0
down vote
up vote
0
down vote
You need to add your own git respository as remote
. You can't however do this within Android Studio, according to this thread. Use the command line instead:
git remote add remoteName remoteUrl
git fetch remoteName
Then you can go to Android Studio, VCS > Git > Pull
and select your added remote repository.
You need to add your own git respository as remote
. You can't however do this within Android Studio, according to this thread. Use the command line instead:
git remote add remoteName remoteUrl
git fetch remoteName
Then you can go to Android Studio, VCS > Git > Pull
and select your added remote repository.
edited May 23 '17 at 12:13
Community♦
11
11
answered Feb 26 '15 at 17:47
Darek Kay
9,11244350
9,11244350
5
I think you didn't get my question. I have a fork of the library in my github and it is modified. In my android studio project I imported the original library using Gradle dependencies which is without the modifications I made. Is there a way to use dependency to import the modified version of the library which is in my github?
– avafab
Feb 26 '15 at 20:18
add a comment |
5
I think you didn't get my question. I have a fork of the library in my github and it is modified. In my android studio project I imported the original library using Gradle dependencies which is without the modifications I made. Is there a way to use dependency to import the modified version of the library which is in my github?
– avafab
Feb 26 '15 at 20:18
5
5
I think you didn't get my question. I have a fork of the library in my github and it is modified. In my android studio project I imported the original library using Gradle dependencies which is without the modifications I made. Is there a way to use dependency to import the modified version of the library which is in my github?
– avafab
Feb 26 '15 at 20:18
I think you didn't get my question. I have a fork of the library in my github and it is modified. In my android studio project I imported the original library using Gradle dependencies which is without the modifications I made. Is there a way to use dependency to import the modified version of the library which is in my github?
– avafab
Feb 26 '15 at 20:18
add a comment |
up vote
0
down vote
This is how you should do it:
- Fork the repo.
- make changes and commit them
- edit the push urls to your github forked repository.
- make a release/tag
- head over to jitpack.io
- generate a url to add to your gradle file
add a comment |
up vote
0
down vote
This is how you should do it:
- Fork the repo.
- make changes and commit them
- edit the push urls to your github forked repository.
- make a release/tag
- head over to jitpack.io
- generate a url to add to your gradle file
add a comment |
up vote
0
down vote
up vote
0
down vote
This is how you should do it:
- Fork the repo.
- make changes and commit them
- edit the push urls to your github forked repository.
- make a release/tag
- head over to jitpack.io
- generate a url to add to your gradle file
This is how you should do it:
- Fork the repo.
- make changes and commit them
- edit the push urls to your github forked repository.
- make a release/tag
- head over to jitpack.io
- generate a url to add to your gradle file
edited Nov 11 at 13:54
Xenolion
2,78531028
2,78531028
answered Nov 11 at 12:50
Job M
6010
6010
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f28749014%2fhow-to-import-your-own-github-forked-library-into-android-studio%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I have the same problem, but all i can think of is
Import as Module
way , since you have it in your disk. I know this isnt the solution your looking for but I think this is the only way(I think) as of now.– david
Jan 22 '16 at 6:20