"Destination Path Too Long" when moving an AndroidStudio project - windows

I have recently started to learn on Android application programming using Android Studio. I have my recent projects in C:/.
However, every time I want to copy or move these projects into another folder, Windows complains that the destination path is too long (the folders name are color and drawable).
So, how can I move these folder from C:/ to somewhere else?

You'll have to move them to a path where the longest path length, with file name, is less than 255 characters. There is no other solution.

I fixed this problem by moving the project via AndroidStudio Refactoring.
Open the project that you want to move.
Change to Project view.
From there you can Refactor, Move your project to your desired directory.
AndroidStudio will take care of this path to long problem.

Related

How can I move a project in Intellij IDEA CE 14 (OSX) without losing my settings/history?

I've been working on a project for a little while called (for example) work-example in my work directory.
I'm refactoring a bit and want to move the project from ~/code/projects/work/work-example to ~/work/example. However, I've found that I can't move the project directory without loosing everything. Am I just not understanding something very fundamental about IntelliJ?
My searches have all returned how to move projects within the root folder via the refactor function. This is not what I want to do.
I want to just move the entire directory to a different location.
I'm running OSX.
Thanks so much for your time, everyone. :-)
You should be able to move a project folder. IntelliJ stores all project settings inside in .idea folder or in *.ipr, *.iws, *.iml files. Close your IntelliJ move the project folder and then open from a new location and it's done.

Search Paths Confusion in Xcode 4.6

In Xcode I added MailCore as a subproject, and target dependency. It works great on my machine. Sadly when I share the project with another collaborator, he's unable to get the header file to show up.
Somehow his search paths have my folder names hardcoded in (as in andrewjl), is there a way to fix this in order to point to an analogous directory on his machine?
Instead of using an absolute search path, use a relative one.
"$(SRCROOT)" is where your projectfile is located.
"$(SRCROOT)/AnotherFolder" for AnotherFolder is a peer of your project file
once add this variable, to the search path (after double tapping on the searchpaths line), you can add "$(SRCROOT)/Products/MyReceipt.........." and once you dismiss the add/remove searchPath popover, you'll see where the search path is pointing to.
Your search paths are absolute paths. Write them as relative paths (relative to the project).

Is there a way to reconstruct an Xcode project file?

If the current Xcode project files (all inside the ProjectName.xcodeproj folder) are missing after a crash, is there a way to reconstruct it if not relying on git? (the project file is not committed all the time).
There is not enough redundant information elsewhere to completely reconstruct an xcodeproj file, but you can start by making a new one and dragging the source code into it.

What is a blue folder in Xcode

I have opened a project from Github, which has blue folders in its file structure.
As far as I understand this is a physical folder reference rather than just a means of grouping files together which might just lay around loosely on your hard drive.
So my question: When do you use those blue folders over the "normal" Group, what are its advantages and drawbacks and how do you create them in Xcode?
If you use blue folder references for your resources these folders will also be created inside your application bundle, while resource files in groups will simply be copied to your mainBundle's root directory.
When folder structure is managed outside of XCode (for example, a cross-platform project which has project files for different versions of XCode, Visual Studio and other IDEs, all using mostly the same directory tree), you normally want folder references. Otherwise one would have to recreate every project file every time folder structure changes.

What is "Source Tree" in the Xcode preferences and what can I do with it?

I've been recently researching how I can manage source files in a project or multiple projects. I've read that Xcode has a built-in support for using svn, and will support git as well, both of which I found to be very useful.
The one thing I couldn't understand clearly is about Source Trees described in Xcode Project Management Guide. Here is my theory, but as I couldn't really verify this from anywhere (as far as I could tell), I would really like if someone could say what I'm missing, if any.
A Source Tree in Xcode preferences is more like a root of a source tree, which is a folder in my local file system.
I can use any files in any of my Xcode projects, even if the files are not in the project folders, if I can specify the files' location related to one of my source trees.
Now someone has the same project folder that is synchronized with mine. She has all files in the project folder, but the files referenced by a relative location to the source tree may exist out of the project folder.
But she has a source tree, with the same Setting Name to mine, (but absolutely in a different folder in her local file system), and if she has the file in the same relative location, then her Xcode can access the file without a problem.
So is this correct, and we use source trees because it enables us collaborating with files outside the project folder?
And even if the files outside the project folder is referenced by a relative path to the project folder itself (not to a source tree), if these files are all managed by SVN so they exist in the same relative location to the project folder in everyone's environments, then I wouldn't need source trees, right?
I never think I am an expert of Xcode, but it seems your question hasn't been answered for a while, so maybe it's worth commenting what I could say:
What you described is pretty much about it. Think is as an environmental variable of an operating system. Typically in a build system made by Autotools, for example, files are referenced by relative paths, such as $PROJECT_HOME/src/common/error.cpp. It doesn't matter where $PROJECT_HOME is in each user's local file system, as long as files are accessible by their relative paths to the user's $PROJECT_HOME directory.
And yes, you don't need to use source tree if the entire folder hierarchy used for a project is referenced by relative paths to the project home and somehow it is certain that everyone has the same files in the same location (for example, because a version control repository contains every files in a chunk as you said).
However, I think it's the best to keep all files in the project home folder, unless they are used across multiple projects, and therefore your version control repository only contains a single root directory (the project home) for your project. If there are files that are best to be shared by multiple projects, then I would have a separate repository for those files. In this case all of your coworkers must use the same protocol, say, having a source tree with the same setting name and put all project homes retrieved from your version control server directly under the source tree (so files outside a project home can be referenced in relation to the source tree for all programmers).
The most of my answer is kind of rephrasing what you already described, but that's how I use the source trees feature in Xcode myself. Maybe others can tell you more about it.

Resources