I'd like to know what is that trash that was pushed by Android Studio to bitbucket. Those files and directories don't even exist in a project directory. What are they and how can I get rid of them. BitBucketScreenshot
.gitignore? If so, why again project directory doesn't contain any of these?
Greetings.
Problem is solved. By accident I have setup IDE settings remote repo the same as project one.
Related
I'm building a library for Android in Android Studio. In order to test and debug this library, I created a project with two modules: a library module (my code) and an app module (for testing)
Creating these was pretty easy. I just clicked File > New... > Project and followed the prompts. Afterwards I was able to write code, hit build, and observe the results in the app that was generated.
After a couple of months, everything was ready to deploy. I've been regularly committing my code and pushing it to a central repository, so another developer at my company cloned the repository and tried to open it in Android Studio. He was met with an entirely different view.
This is what I see:
This is what is seen if you clone the repo and open it:
When looking at the second view there's no way to build the project, there are no build configurations, no variants, and none of the gradle scripts seem to run.
If instead of cloning I just cp -r my entire project directory and open that in Android Studio, it opens perfectly. So the issue seems to lie with something in my .gitignore hiding an important configuration file necessary to build the project.
The .gitignore was generated for my automatically by Android Studio. It looks like this:
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
Everything there should be files generated by the build tools or local workspace configuration files, not project-level files necessary to compile. But I'm not very familiar with Android, its build steps, or the 800,000 things Android Studio is implicitly and secretly doing behind my back. Just opening the project in Android Studio causes 12 or so files to get modified on disk, so I know that it's doing a lot of things behind my back.
I can share any details about my configuration or project setup as necessary. I've spent a few hours on this already and can't figure out for the life of me how to get this project to build.
While it's probably not the proper solution (after all, Android Studio created the .gitignore for me), I found that removing /.idea/modules.xml from the .gitignore and checking in this file fixed all of my issues. Suddenly when I launched Android Studio it detected everything, some Gradle scripts ran, and I was able to build my project.
For the past few months, I can't push the whole res folder to my github and gitlab repos. I uninstalled my Android studio and tried using Sourcetree as well. None of these worked. I tried from a different computer and was able to push my code but not sure why I can't do it on my own computer.
The content of my res folder in my repository
Put the Project view on Project. then right click on res folder and use git -> add menu. now after your changes, res folder can be commit and push to remote branch. also check the current branch name in right|bottom of android studio.
here is tutorial for Git in android studio.
I finally found an answer to my question. .gitignore_global was excluding the xml files from pushing to my git repository. I modified it and that fixed the problem.
I'm using Android Studio version 1.5.1 and we have a problem when cloning and working with Github.
In my gitignore file I got a text saying *.iml, as I understand this means that all my iml files are ignored by git and not uploaded. When my project collaborators are cloning my project, they get a error message telling them that there is 2 missing iml files. They are asked to either keep or remove them. It doesn't matter which they do beacuse it still gives the same problem. They cannot code or build anything.
As I understand the iml files should not be uploaded to github but instead Android Studio should automaticly generate them when it is building or importing a project.
What have we done wrong?
After cloning the repo, you should re-open the project with
File -> Open
and select your project you've just clone and android studio will re-build, re-index and re-create the .iml file :)
I have an IntelliJ android project which has two dependencies as module (ActionBarSherlock and FacebookSDK). So we can see three project folders in IDE. Also, each module has several jar libraries.
Here comes a new colleague and I want to share my project to him.
I gave him my GitHub repo url and he checked out. But I realized that IntelliJ does not have any file like .sln in Visual Studio (Just double click to open the IDE and every projects and related setups are in there). Besides, I had to create new project again to my colleague PC, import two other projects as module, add as Library, check dependency, and so on...
maven could be a solution but it sometimes ruins project setup.
Is there any simple way to make it?
This article on the JetBrains Support site goes over which files to commit to version control.
The short answer is:
Directory based project format (.idea directory)
This format is used by all the recent IDE versions by default. Here is
what you need to share:
All the files under .idea directory in the project root except the
workspace.xml and tasks.xml files which store user specific settings
All the .iml module files that can be located in different module
directories (applies to IntelliJ IDEA)
Read the article fully, as it goes into things you may not want to put in version control.
But I realized that IntelliJ does not have any file like .sln in Visual Studio
Not true, IntelliJ uses .iml files for this.
More info on the IntelliJ Project Files documentation
For importing, have you friend open Intellij and from the upper window menu:
VCS
Checkout from version control
Github
From there follow the wizard interface (dialogs with questions) and they'll be good to go.
Trying to check out my Android project from an SVN repository, I got the following error:
0x0000000f: The folder 'E:\workspace\mc-01-02\project.properties' is locked by some external process. Please unlock the folder and try to check out the project again.
project.properties actually is a file, not a folder.
As a test, I created another project and added the "project.properties" file to svn:ignore. I got this:
0x0000000f: The folder '/media/D/workspace/andi/.fuse_hidden00002a6900000003' is locked by some external process. Please unlock the folder and try to check out the project again.
Again, ".fuse_hidden00002a6900000003" is a file, not a folder. In both cases, the files were created with content and perfectly readable.
As you might have noticed, I tried this from a Windows Eclipse and a Linux Eclipse. (I have my workspace on my Windows partition.) Both attempts failed. Yet, checking out to a workspace on the Linux partition succeeded.
I'm using Eclipse Galileo with the Subversive plugin.
This might be a problem with Android tools interfering?!?
Input, anyone?
Select the project
Right click on the selected Project
Team -> Cleanup
Then try