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
Related
I was working on an Android app, and decided to do an initial git commit. The project folder was on my desktop so I moved it into a newly created folder as to not make the Desktop into a git repository. The project was open in Android Studio when I moved it and made the commit, and when I went back to it it didn't work.
I closed it and reopened it and it wouldn't compile (I was a fool and didn't screen shot the error message) but then it started to work.
However, all the files in the project are in red, not the code itself, just the files that a visible in the tab on the left and the tabs at the tops of the open files. The project works but I want to get rid of the red as obviously it's an indication that something's not right.
I have to send this project for review tomorrow and I hope this won't create an issue for the recipient.
Thanks
The files are red because they have not been committed to git.
git add . and git commit -m "your commit message" should fix it.
And No it should not be a problem. I suggest you read more about git, it's a cool tool
I have recently created a new Android application and have used its VCS to integrate with GitHub. My problem is that although the integration appears to work, the only file in my Android application that has been saved to GitHub is MainActivity.java. I have tried to add files into GitHub but via the Website but this fails as there are too many files and it doesnt allow Folders to be added.
Has anyone else had this issue?
It's frustrating as when I make changes to MainActivity.java it gets saved and committed/pushed okay but the VCS in Android just doesn't see the other files I have changed such as the content_main.xml which I changed to see if it would then be added to GH.
I cannot seee how to add files within Android Studio to GH via VCS. Does anyone have any pointers where I may start? Thanks!
NB I have had a look through existing questions but none address my issue as far as I can tell.
Usually when you start a new project, Go on VCS -> Enable Version Controle Integration.
Then you should have the Version Control accessible on the Bottom Left of the IDE.
In the tab Local Changes, you will see Default and Unversioned Files.
Just take files from Unversioned Files to Default to start to track them.
To my shame once I checked Xiaomis suggestion I could see that my git was pointing to a directory lower than my /app directory. I tried to change in in my GitHub shell but was unable to do this as GitHub Desktop shell didn't recognise the new directory.
To fix my muddle I deleted my original repo and delted the .gitignore file and other git files from my Android project folder. I then opened Android Studio and went through the process of creating a new repo from there, circumventing GitHub entirely. This worked and enabled me to select my /app directory as the Git root.
Thanks go to Xiaomi who's suggestion made me notice that git was looking at the wrong root. Live and learn!
We had to change the name of Bitbucket git repository. So when I loaded the project, Changes tab only had Local part.
I then edited .git/config file and update the url inside remote "origin" and restarted Android Studio.
But even then, Android Studio could not see the repository with a new url. And we only changed the URL.
Did anyone ever meet anything like this? Any idea how to fix it?
Funny thing, when I delete the complete project and re-clone it, Android Studio still does not see it. So I guess the error must be inside .idea directory, but I am not sure what file to edit inside this directory.
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.
I am new to working with repositories.
I'm forced to work with my team on academic project using git. My job is to write Android app.
The problem is when I wrote it, then pushed it to repo I want to pull it on different machine.
But when I pull it, I get only "source" files, no: (for example) R.java.
Moreover: I wanted to use "Clean project" Option, but it seems, that my Eclipse is not treating the pulled files as project (when I click "Clean..." I can choose any project in my workspace, but the download one is lacking).
Anyone could help me?
EDIT:
I've solved the problem:
Git doesn't push to repository automatic-generated files, like R.java. After you pull it back, you have to Clear project and rebuilt it. If it still doesn't work: try restarting Eclipse