I've marked certain directories & files as excluded in Android studio. I'm looking for the file where intellij/Android Studio keeps track of those configurations.
It used to be inside the .iml file however I don't see that file in my project or new projects anymore. I couldn't find this info in files under .idea directory either.
Does someone know where can I find this configuration file?
This information is stored in .uml file of the module. See
Related
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.
I meet the problem Cannot resolve symbol AppCompatActivity
I solved the problem by deleting .idea folder and syncing project with gradle files by the acticle Cannot resolve symbol AppCompatActivity - Support v7 libraries aren't recognized?
Could tell me what .idea folder is ? Why can I delete it and sync ?
.idea folder is storing the settings for your IDE (Development Environment) - so the settings of Android Studio how to visualize your project.
You can check more about .idea folder here
The .idea folder (hidden on OS X) in the solution root contains IntelliJ's project specific settings files. These include per-project details such as VCS mapping and run and debug configurations, as well as per-user details, such as currently open files, navigation history and currently selected configuration.
Some files should be committed to source control, some should be excluded.
See here: https://rider-support.jetbrains.com/hc/en-us/articles/207097529-What-is-the-idea-folder-
It stores project specific settings that pertain to AndroidStudio. It is called .idea because AndroidStudio is derived from JetBrains' Intellij IDEA. Most if not all IDEs in this family create such a directory. For example, JetBrains' Rider, an IDE for writing .NET applications, also creates such a directory.
Basically it is for project scoped IDE configuration.
What are .iml files in Android Studio project? I read that it is configuration file for modules. I do not understand how it works, and can't I just use gradle scripts to integrate with external modules that you add to your project.
Also, most of the time AS generates them, so I cannot control project behaviour. If I have a team that works in different IDEs like Eclipse and AS, is it possible to setup my project so it's IDE agnostic?
I don't fully understand how this system works.
What are iml files in Android Studio project?
A Google search on iml file turns up:
IML is a module file created by IntelliJ IDEA, an IDE used to develop Java applications. It stores information about a development module, which may be a Java, Plugin, Android, or Maven component; saves the module paths, dependencies, and other settings.
(from this page)
why not to use gradle scripts to integrate with external modules that you add to your project.
You do "use gradle scripts to integrate with external modules", or your own modules.
However, Gradle is not IntelliJ IDEA's native project model — that is separate, held in .iml files and the metadata in .idea/ directories. In Android Studio, that stuff is largely generated out of the Gradle build scripts, which is why you are sometimes prompted to "sync project with Gradle files" when you change files like build.gradle. This is also why you don't bother putting .iml files or .idea/ in version control, as their contents will be regenerated.
If I have a team that work in different IDE's like Eclipse and AS how to make project IDE agnostic?
To a large extent, you can't.
You are welcome to have an Android project that uses the Eclipse-style directory structure (e.g., resources and manifest in the project root directory). You can teach Gradle, via build.gradle, how to find files in that structure. However, other metadata (compileSdkVersion, dependencies, etc.) will not be nearly as easily replicated.
Other alternatives include:
Move everybody over to another build system, like Maven, that is equally integrated (or not, depending upon your perspective) to both Eclipse and Android Studio
Hope that Andmore takes off soon, so that perhaps you can have an Eclipse IDE that can build Android projects from Gradle build scripts
Have everyone use one IDE
Add .idea and *.iml to .gitignore, you don't need those files to successfully import and compile the project.
They are project files, that hold the module information and meta data.
Just add *.iml to .gitignore.
In Android Studio: Press CTRL + F9 to rebuild your project. The missing *.iml files will be generated.
Those files are created and used by Android Studio editor.
You don't need to check in those files to version control.
Git uses .gitignore file, that contains list of files and directories, to know the list of files and directories that don't need to be checked in.
Android studio automatically creates .gitingnore files listing all files and directories which don't need to be checked in to any version control.
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.