I recently downloaded the Bitbucket plugin for Android Studio (I'm running 1.1.0). Initially, I downloaded it from this link (https://plugins.jetbrains.com/plugin/6207?pr=phpStorm) which should be compatible with Android studio.
When I tried to clone a project in my repo, it prompted me for login credentials. I entered them, but it tells me that I can't connect to bitbucket. Then I installed the plugin from the plugin settings page seen here
I made sure that the plugin was enabled. I'm thinking this is an issue that has to do with proxy settings (I'm currently on my college campuses network, but I can connect to other VCS services like Git without problems so I doubt that's the problem).
Any suggestions?
EDIT:
Going into Bitbucket's settings and testing it shows this:
Had the same problem some time ago. Though I have not yet upgraded to 1.1, I found this implementation to work with previous version:
https://bitbucket.org/dmitry_cherkas/jetbrains-bitbucket-connector/downloads
It seems the "official" one is outdated and this one is working fine.
Please, let me know if this does work for you.
Regards
Jose
you don't really need bitbucket plugin.
Push your project to bitbucket
create a new repo in bitbucket
click on "I have an existing project" in bitbucket repo
execute these commands in Android studio Terminal to push your project to bitbucket
Checkout from Bitbucket
you can also checkout bitbucket projects giving bitbucket URL in "Checkout from GitHub" option in Android Studio
If you are still having problems (like I was recently) even though you've tried the plugin and you feel uncomfortable or not knowledgeable about initializing git for your project by hand via terminal you can use SourceTree. You will have no problems with BitBucket using source tree since both are made by Atlassian.
Once you've installed SourceTree and walked through the first boot setup process giving SourceTree your credentials you click Clone/New and a dialog will pop up. There will be the normal browse button and also a button button that looks like a globe allowing you to browse the hosted projects linked to your BitBucket account. You can also copy an paste the link from the project home on bitbucket as well. Once you've chosen the repo you want to clone, pick the destination folder and if you want to bookmark the project or not and press "clone".
Once clowning is complete you should hit the pull button to pull down the latest changes picking the appropriate branch you want to pull from. When pulling is complete you should have all the files that's on the head of that branch (master if not specified) which in most cases is an android project.
Open Android Studio and choose File->Open and browse to the folder you just pulled data to and that open the android project. Once that is done and the project is open make sure you go to VCS and you should not see "Enable Version Control Integration". If you see this that means android studio does not see the .git folder hidden in the project root (or something in that ball park....maybe it's really not in the project root). If you see git commit and git pull options then you are now using version control and bitbucket as your remote repo. Make a change to a file and you should see it turn blue specifying that changes have been made but not committed.
For more info on version control in android studio see this video https://youtu.be/Ldmc757EXaE?t=6m47s and the documentation on the intellij website.
Related
So when I try to share my project with GitHub through Android Studio, it says I have done it successfully, and a new repository is created, but when I open the repository, it is empty. I'm pretty inexperienced with GitHub, and I have spent hours trying different things and I can't get it to work, so if someone could help point me in the right direction, I would be extremely appreciative.
Here are the steps for seamlessly working with Android Studio and github
Create a new project in Android Studio.
Create some files.
Go to VCS -> Enable Version Control Integration. Select git
Go to VCS -> Commit File and select all the files that you want to commit with a message.
Go to VCS -> Push.
Click on Define Remote.
Enter the url for the already created repository in github.
Click Push and enter the Github password.
P.S : I am using Android Studio version 1.5 If you are using some other version, then the steps can be a little different.
After creating Repository, you have to push/commit the source files to the server. It seems you have not committed any file yet.
You can use some other Git clients like Source Tree with GitHub
I'm working on an Android application and I've pushed it to GitHub from my windows computer, I'm having problems to pull the code from repository in Mac OS, when it downloads it shows like if the project was corrupt or something.
It shows this:
As you can see the project doesn't download the folder app and all the files that i pushed to the Repository
I might not be pushing it correctly because i've tried to clone well built Android repositories and and they work nicely.
Thanks a lot for your help and Sorry for my English.
Things which you need to do, crate a directory where you want the project to be set up this.
I made a directory called Juanjors_AndroidMeneame and navigated my git bash there.
as shown in the image initialize local git repository.
and then pull the data. as shown in the image
git pull https://github.com/Juanjors/AndroidMeneame.git
after this import the project, and this is what you will get
Unregistered VCS root detected
The directory /Users/*****/AndroidStudioProjects/Signin/google-services is under Git, but is not registered in the Settings.
Add root Configure Ignore
How to resolve this?
Please help.
Press "add root" when the warning message appears.
This will make idea register the "unregistered vcs root", and you can use the git features of IDEA/Android studio. Nothing bad will happen if you do not press "add root", but I suspect you will get the same warning on each startup of android studio/IDEA.
You are able to ignore that warning if you are not interested in using Android Studio's git integration. Or, you can enable git integration under the VCS | Enable Version Control Integration menu.
VCS stands for "Version Control System", aka "undo on steroids". No programmer should be without it.
IDEA (which Android Studio is based on) sees some signs in your project directory that your project source is set up to use a Version Control System.
In this case, the VCS in use is git. The sign is the presence of a projectdir/.git subdirectory.
That indicates that you either created this project directory by "cloning" this project from a git repo:
$ git clone https://github.com/projectname/reponame.git
Or that you created your own git repo in the project directory, by cd'ing to the projectdir and running the command:
/path/to/projectdir $ git init-db
By clicking "add root" you tell IDEA to add this git repo to IDEA's internal settings for the project, so you can use the IDEA features that support using git. I recommend using it, it won't interfere with your ability to use git from the command line, but some of the IDEA git features are handy.
If you don't know/use git, I highly, highly recommend that you learn it. It will make your life a lot easier, in the long run. As I said, it's like "undo" on steroids.
If you already know how to use git, here are a few of IDEA's git features.
The niftiest feature is that you can select a few lines of code, right-click and select Git/Show History for Selection.
The most useful feature (to me) is Alt-9 aka View/Tool Windows/Version Control.
This brings up the version control window, a pane across the bottom of the
IDEA gui.
By default the Version Control Window just shows "Default" (in bold)
and "Unversioned Files".
Expand "Default" to see the files that changed.
Expand "Unversioned Files" to see any files that need to be added to git.
The color indicates the status, all configurable of course, the default config is that blue indicates changed, green indicates added, etc.
Right-click/Show Diff on a changed file and it gives you a nice visual
diff, sort of reminiscent of Meld's UI, which is one of my favorite,
because it uses these sort of cartoon "word ballon" indicators for
each difference, to illustrate where the difference would be in the
other version.
Also, the side of the visual diff that shows the current file appears
to be a fully functional (or mostly functional) IDEA editing window,
making it easy to fix any gratuitous differences.
Some useful related links:
https://www.jetbrains.com/help/idea/2016.1/file-status-highlights.html?origin=old_help
Also, at the same site see:
Howto/General Guidelines/Version Control with Intellij IDEA/VCS-Specific Procedures/Using Git Integration/Checking Git Project Status
Reference/Version Control Reference/File Status Highlights
I'd include links directly to these but apparently stackoverflow doesn't trust me yet.
You can disable Android Studio git integration and get rid of the annoying warning. Here's how with Android Studio 2.1.1 for the Mac OS X:
Menu -> "Android Studio/Preferences...".
In Preferences window: Click on to open "Plugins"
In the Plugins frame: uncheck "Git
Integration".
Disabling "Git Integration" also disables GitHub, Google Cloud Testing, Google Cloud Tools Core, Google Cloud Tools For Android Studio plugins. (good riddance). By default, Android Studio enables all plugins at install time even though most devs will use only 10% of them.
FIRST STEP: Click in configure link.
SECOND STEP: then select the correct and add
If you see this message whenever you open Android Studio and create a new project, It's because your projects home directory is set as a VCS root. Maybe It was a mistake, set by you unintentionally. That was my case.
To solve it.
Just delete .git directory from projects home directory.
Delete: ../AndroidStudioProjects/.git
I have a project made in Android Studio that I wish to put into a GitHub repository. I used "Import into version control" -> "Share project on GitHub". Android Studio then made an empty repository on my GitHub account with the name that I specified. I simply cannot make an initial commit now that the repository is there. When I use VCS -> Git -> Commit file, it simply pops up a window that says "Nothing to commit.". I've tried making a new dummy file, and yet it still thinks there have been no changes. I've also tried selecting all of the files and using the "add" button, but this appears to do nothing whatsoever. How can I get this project on GitHub? My desire, specifically, is literally just to somehow commit my project in Android Studio into this GitHub repository it has created for me so that I can collaborate on this project with some friends. Thanks in advance.
If there is nothing to commit, Android Studio has already commited all your files locally. Now you need to VCS > Git > Push to upload your commits to your GitHub repository.
What ended up happening is I just created a new project, copied and pasted all of my code in, and then used the "Share Project on GitHub" button again. This time, for whatever reason, it worked seamlessly.
The problem
I have a strange problem with SpringSource Tool Suite 2.9.1 Release and Subversive plugin, running on Windows 7 Home Premium x64. I'm trying to checkout an android project from an SVN repository.
Here's what I'm doing:
File > Import > SVN > Project From SVN
I fill in the path to my repository and check the HEAD revision
I click Finish
The project is found and the default option is Check out as a project with the name specified. I leave the name alone Set the Depth field to Recursively and again, select the HEAD revision.
I click Finish
A progress bar appears for a second just to show an error message:
Checkout operation for 'https://(.....)/Android' failed.
svn: Cannot create new file 'C:\workspace-sts-2.9.1.RELEASE\AppName \.svn\lock': System can not find the path specified
When I retry and follow the steps from 1 to 6, another dialog appears. It says:
This project already exists in the workspace
or there is a data folder in the checkout destination.
It allows me to select a folder to overwrite. When I do that, a similar but different error message is shown. It says:
Checkout operation for 'https://(...)/Android' failed.
0x0000000f: The folder 'C:\workspace-sts-2.9.1.RELEASE\AppName \.svn' is locked by some external process. Please unlock the folder and try to check out the project again.
What I've tried
First, I opened the SVN Lock view to see if there were any locks created by the IDE. There were none.
I restarted the computer, hoping it would solve the problem of any application locking the file but this does not seem to be the case.
After that, I created a new workspace in a different location and tried to check out the project in there. The result was the same.
Then, I attempted to change the version of SVN Kit. The situation persists in:
SVN Kit 1.2.3
SVN Kit 1.3.5
Native Java HL 1.5.4
Native Java HL 1.6.12
I thought that changing permissions to the directories of my workspace was worth giving a try. It didn't do the trick either.
Finally, I checked out the project in a different location, using Tortoise SVN and imported it into my workspace. I could run it (though some build path settings seemed to be missing) but it's not a solution. I can't possibly imagine working on the project simultaneously with a couple of people without the ability to commit/update/view history/resolve conflicts in my IDE.
I was advised to install a separate version of eclipse with its own set of tools and a different workspace for this application alone but it doesn't seem like a good idea. I'd like to keep it all in a single IDE. I'd also prefer to avoid reinstalling the whole thing as I don't feel like configuring all the other tools (mostly spring and android-related) from scratch.
Has anybody seen a situation like this? How can I get it working?
It's uncear to me whether this is a subversive problem or an SVN problem. I would try checking out from the command line (you must install SVN command line tools to do this, but I'd recommend having the tools around as a backup anyway).
Checkout from the command line and then import into STS using File -> Import -> Existing projects into workspace. Once in the workspace, you can select the project -> Team -> Share project to get svn support on it.
Rename the project and check out again , It must be a problem where u are trying to checkout the project which already exists with same name in the Package Explorer