git,android-studio , How to Check out from Git (on shared folder) in Android Studio?

How to Check out from Git (on shared folder) in Android Studio?


Tag: git,android-studio

Using Android 1.1.0, I am trying to check out an existing project from a Git repository that I have on a shared folder (Windows SMB/CIFS).

The problem is that Android Studio only accepts URLs, despite the fact that I have been working with non-URL (UNC, drive letter, or both) git repositories for a while, using cygwin's git, from the command line.

For example, if I type an existing drive-letter-based path, it warns me "The parent path must exist":

enter image description here

But I know it exists! So I continue and click the Test button. It then fails with "Repository test has failed":

enter image description here

Is there a way, in Android Studio, to check out from a git repository located on a shared folder?

Note: That .git repository on a shared folder works very well using cygwin's command line and TortoiseGit.


If you are using an application that requires URLs, you can specify the location to a local repository as a file:// URL, for example:


Note (as you did, but this is for other folks who find their way there) that there are three slashes after file:.


Can't migrating AndroidManifest.xml file to Android Studio?

When i try to migrating Eclipse ADT project to Android Studio using "Import project (Eclipse ADT, Gradle, etc.)" then selecting project root folder and then third window gives me error like this C:\Users\Tsomone\workspace\cims-android-app-new\AndroidManifest.xml: Invalid XML file: C:\Users\Tsomone\workspace\cims-android-app-new\AndroidManifest.xml: Premature end of file. and when i try to click Finish, it shows...

Go back before commit and push changes

In my local environment I made several changes, then: $ git log --oneline 2aa8998 Changes 02 5131bfe Changes 01 $ git commit -am "Commit 03" $ git push $ git log --oneline 9ca6c56 Changes 03 2aa8998 Changes 02 5131bfe Changes 01 But I noticed what I made a mistake, as...

getView method causing NullPointerException

I'm getting a NullPointerException, when I'm trying to get some image from database I think my getter and setter method is wrong, any help is much appreciated. This is my Activity public class ViewMoreDetailsImages extends Activity{ ProgressBar progressbar_01; ListView lv_images; ImageAdapter imageAdapter; List<ImageInformation> imageInformationList = new ArrayList<ImageInformation>(); @Override protected void...

How to pull files and only override conflicts

How can I pull down a git and have it overwrite my local project ONLY where conflicts are found? E.g. I have many folders / files in my local project that are not on the git project and never will be. Ok... here is the full scenario. I used DaftMonk...

Android Studio manifest Errors

Could anyone please me as when ever I try to run my app I get errors in the manifest file such as the followig five errors below. Error:(2) No resource identifier found for attribute 'versioncode' in package 'android' Error:(2) No resource identifier found for attribute 'versionname' in package 'android' Error:(9)...

How to undo a successful “git cherry-pick”?

On a local repo, I've just exected git cherry-pick SHA without any conflicts or problems. I then realized I didn't want to do what I just did. I have not pushed this anywhere. How can I remove just this cherry pick? I'd like to know if there's a way to...

choose authentication for git pull

I want to add a second form of authentication to a github remote. Here is the situation : I have ssh access to a shared server In the server, there is a git repository, with a github remote. If I run git pull, it asks for a passphrase that I...

Write Access for user on all repos on Gitolite

I'm trying to add access to read, write and create new repos from my local to a gitolite server. I have the following config on my gitolite server, but it doesn't want to let me push to a new repo: repo @all RW+ = git repo gitolite-admin RW+ = git...

“Arguments to path.resolve must be strings” when calling 'gitbook build' from a Git hook

I am trying to run gitbook build within a post-receive Git hook on my (Gitlab, Debian 7, virtual private) server. Basically I want to: checkout the bare repository to a temporary dir run gitbook build in that temporary dir sync with the webspace through rsync The post-receive script runs something...

PDF file path is incorrect [duplicate]

This question already has an answer here: Android - Access file from assets \ PDF display 4 answers I want to open a PDF file in my application but something goes wrong everytime. Yeah , I watched many topics about it, however none of them helped me. Here are...

Working with 2 git repos simultaneously

My company purchased a license to certain software. The license includes access to the product's github account so we can get real-time updates by fetching code directly from the repository. Additionally, we also develop new functionality for this software in-house, and for that we have created a new git account...

Error execute unrecognized vm option 'MaxPermSize=350m' on Ubuntu 14.04

Error to Execute/Install on Ubuntu: [email protected]:~$ cd android-studio/bin [email protected]:~/android-studio/bin$ ./ Unrecognized VM option 'MaxPermSize=350m' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. And with some knowledge after searching on search engines, I open the studio.vmoptions file in edit mode and...

PNG transparent backgrounds appearing black when using Android Studio

The social icons below (for fb, twitter, mail and share) are circular PNGs with transparent backgrounds. When I use the code and exact same images in Eclipse, I get transparent background but when build and run with Android Studio, I get black backgrounds. See details below. Images are the same....

Git undo changes made in a specific folder

How I can undo changes made in a specific folder? I've modified files from multiple folders like app/code/core/ app/code/local/ app/design/frontend/ I want to undo all the changes made in files present in app/code/core/ while keeping the changes modified in files present in app/code/local/ and app/design/frontend/....

Cannot get my post-commit script to run (git)

I want my remote git-repo to create a zip file from one folder in the master branch every time someone pushes. I renamed the post-commit.sample file and added the following: #!/bin/bash echo "creating zip" /usr/local/bin/git archive --format=zip --output=~/ master:the-folder echo "creating zip done" When I commit from my client I...

Extended description text on Git

I want commit with message and Extended description text to Bitbucket server. It exists on Git-cola software and I need the command line of it. I am using ubuntu and I need terminal command for Extended description git commit -am "My commit text" "My Extended description is this. Containing break...

How to get rid of .ignore file in Git?

I have create an ignore file , the list included .jar files . I then merged my branch to a development branch and even though I had resolved all my conflicts , I still had a lot of errors. Most of them had something to do with support.v4 (the import...

I rewrote my program and need some suggestions for my git repo

My program has gone through a rewrite. I have done all the work in a separate git repo but I want to it all back to the original. Is there a good way to do this so that it is obvious that this a new rewrite? Something like rename master...

How do I view the list of commits that haven't been pushed yet?

I like documenting minor changes as separate commits and finally use git interactive --rebase to combine commits and change commit messages like I deem appropriate. Is there a way to determine which commits I haven't pushed yet without manually checking Github i.e. is there a way to find out from...

Custom post-receive hook with gitlab

I am trying to set up a custom post-receive hook using gitlab I am following their documentation here I have an executable post-receive file in the custom_hooks folder with the following code: !/bin/bash echo "post-receive firing | wall git pull If I run this file with: ./post-receive It works fine....

Getting code from my forked repository

I made a fork from a repository called "chrisbjr/api-guard". the repository latest version is v2.2.2, and I made a release v2.2.3 from my fork. I have my own branch which is dev-fulluth, to get the code from my fork not from the main repo, composer has to contain the below...

Android Studio: cannot upgrade google play services

I have tried download the latest version on the sdk manager, but is still not working. I have seen other posts telling users to enter the following... compile '' I do not understand where to enter it. I tried in the terminal feature of the android studio but it gives...

Android Studio and gradle

I tried importing Xabber ( GitHub ) within Android Studio , I did the git init etc . Now I find that I can start the app for that problem Gradle , I've looked everywhere , but could not find anything that would work .. The problem is: Error:Execution failed...

Cant start developing for android

I have an app on iOS and now i need an android version. BUT I CANT. I downloaded android studio, downloaded everything from SDK manager, did everything for a basic project. But... Everything i use is deprecated. Tried making tabbed application... ActionBarActivity deprecated, every other thing i trie is deprecated......

Is there a way to push to a remote Git repository without having to fetch its objects?

Let's say I have a large Git repository stored in a server so multiple people can work with it. I want to be able to work with individual files from this repository, i.e. read, edit or insert new ones, without having to fetch all its contents, since it's a considerably...

Composer package not found in private repository

I'm using Composer to load my private remote repository from BitBucket: { "require": { "pico/pico-core": "dev-dev" }, "repositories": [ { "type": "git", "url": "https://[email protected]/picodevelopmentteam/php-server-core.git" } ], "autoload": { "psr-0": { "PicoApi\\": "" } }, "minimum-stability": "dev" } My pico-core composer.json looks like this: { "name": "pico/pico-core", "require": { "facebook/php-sdk": "@stable",...

Override .gitattributes text=auto in Windows

This is pretty unintuitive: C:\python-tdl\examples\termbox>git config core.autocrlf false C:\python-tdl\examples\termbox>git commit warning: LF will be replaced by CRLF in examples/termbox/ The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in examples/termbox/ The file will have its original line endings in...

Not able to create staging instance on heroku [duplicate]

This question already has an answer here: Errors of pushing rails app to Heroku error occurred while installing sqlite3, and Bundler cannot continue 3 answers I am trying to create a staging instance of my app on heroku. While I am doing git push staging master I am getting...

Configure Git to use a .pem key from a specific location

Whenever I try to do a 'git pull origin master' I get (It is NOT Github): Permission denied (publickey). I am able to SSH into my AWS EC2 Linux sever, which has the bare repository, which I'm trying to pull from when I get the aforementioned permission error. I have...

Close module in android studio

in eclipse there is simple option to close or open project. How can I do it in android studio to close and open module without import it and delete each time?

How can I get the last commit in all tags?

I've just made a commit in my project, and I was creating a tag in every step, but it seems the last commit was done in some of this tags. The thing is that I can not longer see my latest change from a minutes ago. How can I checkout...

Why does rebasing unset my current branch and does not complete?

I'm on branch b4 and do "$ git rebase master", it gives me conflicts. $ git rebase master First, rewinding head to replay your work on top of it... Applying: rebase: Modified 1.txt Using index info to reconstruct a base tree... M 1.txt Falling back to patching base and 3-way...

Twitter4j - cannot resolve method - setUsessl(boolean)

I'm using twitter4j 4.0.3 core I have this code: public final class TwitterUtil { private RequestToken requestToken = null; private TwitterFactory twitterFactory = null; private Twitter twitter; private TwitterUtil() { ConfigurationBuilder configurationBuilder = new ConfigurationBuilder(); configurationBuilder.setOAuthConsumerKey(ConstantValues.TWITTER_CONSUMER_KEY); configurationBuilder.setOAuthConsumerSecret(ConstantValues.TWITTER_CONSUMER_SECRET); configurationBuilder.setUseSSL(true); Configuration configuration =...

Why doesn't “go get…” work while “go get…” OK?

I try to use go get to install pool according to, but can't success: C:\Users\xiaona\Documents\GitHub> go get -v Fetching https fetch failed. Fetching import "": http/https fetch: Get l.v2?go-get=1: dial tcp ConnectEx tcp: A connection attempt failed because the connected party did not...

Contributing to open source project on github

I want to add translation and a bugfix on open source project on github. I had installed git, forked the project, cloned the fork on my harddrive, changed the permissions of the file(needed to do so I can test the changes), then created a new branch called "Bulgarian_language", then added...

how to add menu items to action bar in more than 30 activities

I have created an app in android studio that has more than 30 activities .I created menu items in some activities by adding them in individual menu files and they worked fine . But the problem is that it is a real headache to add all the menu items in...

Pull request within one project/branch?

Suppose C(=Coder) and S(=Supervisor) are working on a project. For some reasons S never contributes to the codes and just comments on the code. Instead C is the only person coding. Is it possible to send pull request by C to be reviewed by S, within one project, or they...

How to download files from git repository?

So I have few .mp4 files in my heroku repository. And I want to download them to my local repositroy. I'm doing it like this: git pull heroku master But it doesn't download the .mp4 files. How can I get those files?...

Trying to understand git upstream branch

I have a git project. The remote only have a master branch, at local I have a master and proj-structure branch. I created the proj-structure branch using 'git branch -b proj-structure'. I am currently at proj-structure branch at local, when I try to git push, the git suggests me to...

Is it possible to connect to remote DB while working in localhost?

I am working on a project with my developers on localhost. We are using git to collaborate but are having issues collaborating the database using git or using a remote db. Is there any possible way where I can use git or set up a remote server while working with...

Fix git branch after another developer did a reset

We 2 developers are working on a branch. I did 2 commits, and pushed them, and we later decided we didn't want them anymore. I did git reset -i <sha> to the sha before the 2 commits, and then force pushed it to the branch on github. The other developer...

Error:(12) No resource identifier found for attribute 'scalteType' in package 'android'

Getting error messages when running an app on debug mode during the Gradle Build in Android Studio. This is the error message: Information:Gradle tasks [:app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72211Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42211Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig...

How to tell git-svn that files are NOT binary

I am converting a large SVN-repo (~28k Commits) into Git using git-svn. When the process was through (~ 1 1/2 weeks) I encountered some .ps1-files being treated as binary in the diffs. I have commited a .gitignore file on master (after the conversion of course) that tells git to treat...

Countdown Timer Notification

I'm begginer in Android programming, I have to do a CountdownTimer that starts from a number selected by the user using a two number pickers (one for Hours and other for minutes). The characteristics must be: -The CountdownTimer must work in background and notify the user when it arrives to...

Git post-receive hook is not executed

The following post-receive hook: #!/bin/bash echo "-> Post-receive test" is not executed when pushing to my remote repository. The remote is ssh://[email protected]:2222/home/git/repo.git (it's a VM) and works, as when I manually checkout it I see the modifications I've made. Some additional informations ... $ ls -al /home/git drwxr-xr-x 7 git...

Can git ever send your code to a repo that isn't yours?

Can running git add . git commit -m "message" in a git repo which you've initialized using git init ever result in your code being sent to a repo that is not yours? I am concerned because I did this while not logged in to my git hub account....

Android device monitor seems to miss crashes

At seemingly random occasions it looks like Log cat in Device monitor bundled with Android studio misses error messages. I have an app that crashed on different errors, Index out of bounds to mention one. At some occasions this crash was shown in the log, at other occasions it showed...

Why can I view some Unix executable files in Mac OS X and not others?

I am on a Macbook Pro on Mac OS X 10.10 (Yosemite). When I go to /usr/bin, git is there as a unix executable file. When I open it up in Sublime Text, all I get is unreadable machine code. However, when I open up a different Unix executable file—in...

Managing git repos

I am new to git and am unsure of a few things, would really appreciate if someone could answer the below questions. So I own 2 private git repos. Repo1 has numerous developers contributing. Repo2 is only for me. I want to be able to basically take a copy Repo1,...

git: assume unchanged bit not set

I have a file in my repo for which I tried setting the assume unchanged bit but it's still showing up in my unstaged file list. When I list all files for which the assumed unchanged bit is set, I get no files. Below are the steps I did. /tmp/GitIssue...