I'm a newer in Android and i wish to import this project to my android studio.
How to do it?
Read this full document. It will explain in details step by step whats need to be done.
Step 1: Install git for Windows
It can be downloaded for free from git-scm.com.
Most settings available during the installation process should be compatible with Android studio. Just choose the settings you deem the most appropriate.
Step 2: Link git executable to Android Studio
Open Android Studio and got to Settings. In the Setting dialog open the page Version Control / Git. Here define the path to the git executable you have just installed.
Step 3: Get the Path to your Repository from Github
Go to the GitHub page and get the HTTPs path to your repository.
For instance: https://github.com/mxro/WallOfTheWiseAndroid.git
Step 4: Import the Git project to Android Studio
Go to Android Studio and go to Menu / VCS / Checkout from Version Control / Git
Fill in the required information: username, password, url etc
Now the project should be imported to Android Studio and you should be able to commit and push future changes back to GitHub.
In the newest version of android studio (The 1.3 beta) you can go to File -> import Sample
Then you can select the project you wanted. It's under the getting started heading.
Related
I need to create an android studio project from this directory on github. I tried VCS -> Checkout from Version Control in Android Studio, but there is no url for this directory in the repo, so I'm not sure hot to clone just this subdirectory.
I also tried downloading the whole repo, doing File -> New -> Import Project in Android Studio, and selecting the messaging subdirectory as the folder to import. This showed a build progress bar, but after it finished, there was no imported project.
How do I do this?
I am not sure if its the correct way, but i resolved it with the following steps on Android Studio 4.1.1 :
Run Android Studio until the Welcome to Android Studio screen shows up.
Select Get from Version Control.
Paste the URL.
Press Clone button.
This will import the complete repository , but you won't be able to run the app yet (exactly as mentioned in your question) .
Now close and re open Android Studio
On welcome screen, select import Project (Gradle, Eclipse ADT, etc.)
Navigate to the folder where the project was downloaded and select the required Sub-folder
Press OK and let the Studio build your project.
I get it now. Go back to this. Then hit Download Zip and unzip it. In Android Studio go to File -> Open -> then to the quickstart-android-master and then down to messaging. Do NOT open quickstart-android-master go down to messaging and open that.
EDIT
Be aware you will have to follow these instructions to get the project to build and run.
Add google-services.json in android studio
How do I properly import a project to Android Studio from github?
When I attempt to import the projects from github that is about a year old, I would get errors, and not have a functional project.
https://github.com/baseball435/SpaceInvaders
If I import the project above,
I get this message:
In addition, I get an awkward structure :
To import into Android Studio, select File > Import, and then select the directory containing the project to import. A wizard will open and guide you through the rest of the import process. When the project import has finished, it will open up a file called "import-summary.txt" which lists all the steps taken during import and suggestions for next steps. For example, it may note files that were not migrated, it may note missing components in your SDK install, and so on.
I was successful in importing projects from Github.
I think you should import only the SpaceInvaders-android part.
After import a gradle rebuild is all that is required.
I think this is the Importing github project you need. Just follow the steps.
Install git for Windows
It can be downloaded for free from git-scm.com.
Link git executable to Android Studio
Open Android Studio and got to Settings. In the Setting dialog open the page Version Control / Git. Here define the path to the git executable you have just installed.
Get the Path to your Repository from Github
Go to the GitHub page and get the HTTPs path to your repository.
Import the Git project to Android Studio
Go to Android Studio and go to Menu / VCS / Checkout from Version Control / Git
I am using Visual Studio online for my development process. And I want to integrate my Android Studio 1.0.2 codes in it. However, as I know Android Studio has no TFS Plugin. That's why, I want to use Git for source control.
How can I integrate Visual Studio Online Git repository to Android Studio 1.0.2. What are the steps that should I follow?
First you need to create a Team Project in Visual Studio Online that is configured to use Git as it's Source Control Repository:
So, log on to you VSO account (or create one if you don't have one yet):
Create a new project from the dashboard:
In the "New Project Wizard" that comes up, make sure you select the use of Git:
Wait for the project to be created and click Navigate to Project when it's done. In the project's dashboard navigate to the Code tab:
And on the code tab you'll find your fresh Git repository.
You also get a notification that you must enable Basic Credentials so that git can connect (git doesn't support connecting to the Microsoft Account/Windows Live ID directly). If you haven't done so, now would be a good time.
Open your profile to set that up:
And configure Basic Credentials:
Now you're ready to connect to Android Studio and open your Git repo on Visual Studio Online:
Enter the Git repository location that was highlighted on the repository page before:
And your Alternate Credentials as you had defined them.
Android Studio will now ask you whether you want to create a project here. If you choose yes, you're all setup to start on your new project.
If you choose no, you can move an existing project into the repository root you just created and commit and push it.
I have a scenario wherein. I need to use android studio as IDE and Team foundation Server as source control repository.
The problem is there is no plugin for TFS in android studio.
And there is no standalone client for TFS(Windows)
I tried using Tortoise SVN with SvnBridge to connect to TFS. But it does not work.It seems there is a bug in SVNBridge.
Any suggestions, how to get this working?
Thanks
Answering my own question:
There is no possible way to use TFS with android studio. We have to wait for AS 1.0 release. Then they might migrate all features of Intellij to AS. And then it might have TFS support.Still no confirmation.
There are a few solutions:
If you are using Visual Studio Team Services (visualstudio.com) or TFS 2013 you can use git and any free git client you like.
If you are running on Linux/Mac you can use the Team Explorer Everywhere command line.
If you are using Windows, installing Visual Studio will give you a "tf" command line.
If you are using an Express Edition (or don't have Visual Studio) you will need Team Explorer or even Team Explorer Everywhere.
You can also see if the MSSCCI providers integrate with Android Studio.
I have Android Studio 0.8.9 and attempted to install the TFS Integration plugin via the Plugins dialog available on the Welcome display. After restart of the AS, the TFS Integration plugin is indeed listed but is highlighted in red! Under the Version Control node in the Settings dialog, there is no TFS listed. Therefore appears it is not supported at present.
If you are using Windows you can use the Visual Studio Power Tools:
Windows Shell Extensions This tool provides integration with Windows Explorer and the common file dialogs. With this integration, you can perform many source control operations without having to run Visual Studio or a Team Foundation command-line too
There is a plugin listed in Jetbrains plugins page.
You may try this
You can try this, which I was just able to do successfully for one of my projects:
First make sure you have Git installed on your machine, which you can download from the open source project site. After installing, configure your android studio settings under Version Control - Git to point to the Git.exe file.
Create a Git project on TFS web portal or Visual Studio Online (click the New link and for Version Control, change the default Team Foundation Version Control to Git).
Once you create the project, navigate to the CODE page where you will find a link under "To clone this repository in Git, use the following URL:" (message slightly different in earlier versions, but the ling is still there). This will be the link you will use in Android Studio. If you are using Visual Studio Online, you will need to create a secondary login to your project so Android Studio can login. Click on your name at the top-right of the window and the My Profile link. Select Security (or Credentials in older versions) and then Enable alternate authentication credentials and create a secondary login ID. If you're using a corporate TFS, try to connect as indicated below, but you may need a TFS admin to help with permissions if you don't have access.
Open Android Studio. Under the VCS menu or on the main load page, select Checkout from Version Control and then Git. Enter the link you found in the CODE page of your new visual studio project for the Git Repository URL. The Parent Directory should be your android studio projects folder. Enter the name you want to give the new directory where your project will be or use the default if it is not already used.
Click the Clone button to create the Git directory on your machine. It will ask you to login, where you will enter the new ID and password you created in your visual studio profile (if TFS, try your network login or whatever you use to get into the web portal). You can now start a new project from scratch (once it finishes the clone operation it will ask if you want to create a project; click yes if you do, no if you're going to import an existing project), or copy the existing files/projects into the new directory (you may need to get rid of any existing git folder) and do an Import of the project and commit the changes under the VCS menu. If there are no changes detected, you can try the Add to VCS operation in the VCS Operations Popup under the VCS menu. This will allow you to force commit and then Push to the server. Your files will then be uploaded to the project and viewable in the web portal.
To pull existing projects, do a checkout from version control (git), clone and choose no if asked to create a project. Once the project is cloned, import the project app folder (you may need to sync with gradle).
Microsoft Java ALM Team has released TFVC Support (in preview) for android studio and IntelliJ
The initial functionality available for preview is:
Checkout a TFVC repository from Team Services or Team Foundation Server 2015
View, add, and rollback local changes in your repository
Create, view, and edit your workspace
Checkin and update local files
Merge conflicts from updates
more info :
TFVC Support in Preview for Team Services Plugin for IntelliJ and Android Studio
TFVC Support (Preview)
I am trying to synchronise a project that I have on in my Android Studio folder to GitHub, but I am not fully sure what to do other than adding my credentials in the options menu. Could someone give me a quick guide, please?
Open the project you want to push in Android Studio.
Click VCS -> Enable version Control Integration -> Git
There doesn't seem to be a way to add a remote through the GUI. So open Git Bash in the root of the project and do git remote add <remote_name> <remote_url>
Now when you do VCS -> Commit changes -> Commit & Push you should see your remote and everything should work through the GUI.
If you are getting the error: fatal: remote <remote_name> already exists that means you already added it. To see your remotes do git remote -v and git remote rm <remote_name> to remove.
See these pages for details:
http://www.jetbrains.com/idea/webhelp/using-git-integration.html
http://gitref.org/remotes/
Following method is a generic way of pushing an Android Studio project to a GIT based repository solely using GUI.This has been tested with a GIT repository hosted in Visual Studio Online and should virtually work with GitHub or any other GIT based version control provider.
Note: If you are using GitHub 'Share on GitHub' is the easiest option as stated in other answers.
Enable the GIT Integration plugin
File (main menu) >> Settings >> Search for GitHub Integration
Enable Version Control Integration for The Project
VCS (main menu) >> Enable Version Control Integration >> Select GIT
Add project file to Local repository
Right Click on project >> GIT >> Add
Commit Added Files
Open the Version Control windows (Next to terminal window) >> Click commit
button
In the prompt window select "commit and push"
Defining Remote
After analyzing code android studio will prompt to review or commit code
when committed will be prompt to define the remote repository.There you can
add the url to GIT repository.
Then enter the credentials for the repository and click 'Ok'.(Visual Studio
online Users need to enable "alternate authentication credentials" as
mentioned here to login to repository)
On Android Studio 1.0.2 you only need to go
VCS-> Import into Version control -> Share Project on GitHub.
Pop up will appear asking for the repo name.
In the version of Android Studio I have (0.3.2), it was as easy as using the menu.
VCS Menu > Git > Share on GitHub.
It will then ask you for your credentials, and then a name for your new repo, and that's it!
This isn't specific to Android Studio, but a generic behaviour with Intellij's IDEA.
Go to: Preferences > Version Control > GitHub
Also note that you don't need the github integration: the standard git functions should be enough (VCS > Git, Tool Windows > Changes)
Android Studio 3.0
I love how easy this is in Android Studio.
1. Enter your GitHub login info
In Android Studio go to File > Settings > Version Control > GitHub. Then enter your GitHub username and password. (You only have to do this step once. For future projects you can skip it.)
2. Share your project
With your Android Studio project open, go to VCS > Import into Version Control > Share Project on GitHub.
Then click Share and OK.
That's all!
For Android Studio 0.8.9: VCS --> Import into version contraol --> Share project on Github. It doesn't give you option to share in a specific repository or at least I couldn't find (my limitation!).
You can add your github info here: File --> Settings --> Version COntraol --> Github.
Now you can do it like so (you do not need to go to github or open new directory from git):
First time I have added a video link for solving your problem but I learned it was a bad idea. This time I'll explain it briefly.
Android studio is compatible with github but you need adjust something:
Setup Android Studio
Setup the Github plugins in the Android Studio settings
Android Studio settings >> Plugins page
Download the git version control system from this link and setup
https://git-scm.com/
After the installation, open Android Studio settings page and select the git.exe
settings >> version control >> git
Usually the path to git.exe is program files >> git >> bin >> git.exe
Go to Settings >> Version control >> Github you will see login and password for your Github account. Apply the settings.
For updating the project, go in Android Studio top line click
VCS >> enable version control integration >> git
One more time
VCS >> import into version control >> share project on Github
and enter your master password.
Now you can use VCS update buttons for updating your project to Github
For existing project end existing repository with files:
git init
git remote add origin <.git>
git checkout -b master
git branch --set-upstream-to=origin/master master
git pull --allow-unrelated-histories
In Android Studio 0.8.2 , you have the same option (ie Share on GitHub). If you want to find it, you can use ctrl+shift+a and enter github in the input text.
Github with android studio
/*For New - Run these command in terminal*/
echo "# Your Repository" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/username/repository.git
git push -u origin master
/*For Exist - Run these command in terminal*/
git remote add origin https://github.com/username/repository.git
git push -u origin master
//git push -f origin master
//git push origin master --force
/*For Update - Run these command in terminal*/
git add .
git commit -m "your message"
git push
This is how I got mine working using Android Studio UI:
Delete .git folder from your project folder.
Delete .git folder from all your project subfolders.
Open project in Android Studio.
Settings, Version Control, remove all the roots
Go to VCS, Import into VC, Create git repository
Select the directory
Make sure your folder is the only root in Settings, Version Control
Go to VCS, Import into VC, Share project on Github
Mark as private if wanted.
Select all the files for initial commit, including app folder
Add files, select all in your project folder and app folder.
VCS > Commit -> to commit the files.
VCS > Git > Push -> to push the files.