android studio marked my entire folder as project how can i remove it without losing apps inside project folder.
Copy all the files of that project directory and move to a subdirectory.
While creating a new app you have selected the project folder wrongly. You have to manually remove all the application related files (i.e., .gradle, .iml, etc) from it.
Related
In Eclipse, I had some folders in the project root that were not code - containing text files with notes about the project, Photoshop files for artwork and so on. Having migrated to Android Studio, these extra folders in the project root are not visible in the Project navigation pane - I only see the app folder and Gradle Scripts.
Is there some way to create a non-code folder that is visible in the Project pane but that is outside the app module?
I thought "Create New Module" in the Project Structure dialogue might do it, but it only offers me templates for modules that contain Android code.
--- EDIT ---
Thanks to #SvdTweel's answer I've stumbled across something that seems to do what I want:
switch to the Project view
create the documentation folder in the project root
right-click it and select Mark Directory as>Resources Root
switch back to the Android view and you see a new folder named "resources"
Will this have any adverse effects? Is this folder still ignored when building the app module?
In the Project Structure you can switch from Android to Project.
The default Android view structures and minimalizes the directories and files so that you as a developer can easier navigate through your project.
The Project view shows everything just as you would see when you browse it with your file explorer on your OS.
I think that is what you search for to create files and directories in the root of the project.
You can put the doc files in the test/resources folder. This is clumsy, but it makes them visible in the Android view while keeping them out of the build.
Bonus: code completion when editing Markdown code samples using the JetBrains Markdown plugin.
When I copy files from one Xcode project to another, the files appear in the destination project and the second Xcode project compiles and works fine. So far everything is ok.
But some of the source files have not been moved into the various folders/directories of the destination project. I think the second project is still pointing to some files in the first/source project.
How to completely move the files from the first project into the destination project folders/directories?
Thank you the link you gave me helped. I dragged the files from source to destination folder via Finder. Then I deleted the files that went red in destination project and then added the files in respective folders from xcode.
What is the difference between creating a new directory and creating a new folder in Android Studio?
Here is an image of the menu choices:
Short answer
Use folder when adding a folder to an Android Studio project. This is what Android Studio calls them. Directory is what IntelliJ calls a folder. Android Studio is built on top IntelliJ so there is some naming confusion.
Long answer
Although there is a technical difference between a folder and a directory (see here and here), they are often (correctly or incorrectly) used interchangeably. This can be seen even in the titles of these two SO questions:
Setting a custom assets directory for unit testing in Android Studio
Adding an assets folder in Android Studio
This can be confusing to new users of Android Studio when they see both choices in the menu structure. Further confusion results when users add a new directory and then it doesn't show up in the Android folder view. See these questions for example:
Android Studio: Newly Created Directory Not Appearing In Folders View
New created "values" folder is not visible in Android Studio
The folders actually do show up if you select the Project or Packages view from the menu:
However if you want an Android folder to show up automatically in the Android view you need to right click and use New > Folder > Assets folder (if you are adding an assets folder). You could then add a subfolder like "fonts" to this by choosing the New > Directory option.
Android Studio is built on top of IntelliJ IDEA. IntelliJ itself has a menu option to add a directory (as you can see here). But Android stores files in what it calls folders. So when these two platforms are put together in Android Studio, there gets to be some naming confusion. (This is my interpretation, but perhaps they really are trying to differentiate the subtle differences between directory and folder.)
You can see from your menu image that there is also an "Android resource directory" option. (You got that by right clicking on the res directory/folder rather than a subdirectory.) You would use this to add resource folders such as raw, menu, values, etc.
My OS is Windows 7. In my Visual Studio 2012 when I'm creating any project or website the solution file(.sln) is creating over default VS folder in C: drive. So when I'm trying to create a project in another drive folder, the solution is not in same folder with the project. How can I change it so that solution file will be in the same folder?
There is a check box 'Create a directory for solution' when you create new project, uncheck it.
To fix existing solution remove project from solution place all file in solution directory re-add project to solution.
To fix existing solution, just close it, move all project folder contents into solution folder, open sln file with text editor and fix project path.
right click on .sln file.
go to properties then click on change, then select visual studio icon.
sln file icon would be same as VS icon, hence problem get solved.
I published my project in visual studio by right-click on my project and click publish, the problem is the database file path is changed and i can't find it, i need the path to put it in connection string
can any one help me, please.
Visual Studio will publish an application to a folder where you've told it to; by default it's [project directory]\publish\. The files for a particular publish will be in [publish directory]\Application Files\[revision number]\ by default.
You can check the path by right-clicking on a project in the solution in Visual Studio, selecting Properties and then the Publish tab. If the path is relative, it's in the project directory.
In the Application Files folder, you will find a bunch of files with .deploy extensions; if you've put your configuration in app.config, you should be able to edit it by opening the file [Project name].exe.config.deploy in a text editor.
It's an XML file and you should be able to identify the part you need to change. It will typically look like
<setting name="SettingName" serializeAs="String">
<value>some setting value</value>
</setting>
Installing the application with the created setup file, assuming that the hand-changed revision is the newest one in the Application Files folder, should install it with the new connection string.
I still urge you to consider just changing the app.config file within the project and doing a publish again, this is the way you should be doing it.