//Easy tutorial on android studio with bitbucket (linux)
- create bitbucket repository "testp"
- create a folder "gtest" on your local machine
- go to this local folder("gtest") with cd command
- now clone git repository "tesp" with clone command
- this repo "testp" folder must come inside that "gtest" folder now
- open android studio and create a project "MyApplication" by selecting the project location folder "testp"
- now open terminal and go to path with cd command upto that tesp folder (you can use terminal inside android studio)
- now hit ls command and it should show your project dir "MyApplication"
- on your terminal type command "git add MyApplication/".
10.now enable vcs by clicking menu on vcs and enable vcs ...
- once the vcs is set or enable then select your appliation "MyApplication" project >> right click >> git >> commit directory >> may write comment "initial commit" and hit "push and commit" button.
- see event log for more detail
- check out the repo it should be there.
- if you have to pull this project only then goto "MyApplication" project >> right click >> git>> repository>> pull
Note: here "testp" , "gtest" and "MyApplication" are only example
If you have already android project then
- select menu(vcs) check out from version control
- click clone and copy repository from bitbucket and paste it on dialog given by selecting menu1
- On the second menu provide specific location where you want to clone
- After clone is success it will ask something like create project, anyways click yes.
Now project is created
6.right click on the project and clik new> add module > import project(this is where you import the already existed android project)
7.After every thing is done, build.gradle may have build problem ,if occur paste following code :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
allprojects {
repositories {
jcenter()
}
}
now cd up to your bitbucket clone folder using android terminal
- now add everything inside this folder using git command "git add file1 file2 file3"
- And lastly right click on your project and goto git>commit directory> commit and push and its done
11.You have your code push and commit on bitbucket : check it out
- done
// clone on other computer
clone the bitbucket project using vcs option
and load project(not import) after it get clone
if this not work:
vcs clone to desired directory((click no ,if it ask something like yo have check out an android studio project..Would you like to open it)) and import the project using exact same location of clone directory(use gradle wrapper if asked : it may download so wait) and lastly enable vcs for push and commit.