I have an existing flutter app. I cannot see the android folder in the project. It is there in the directory and in Git. One of the problems is that when I commit my changes through the built in version control, Idea does not see my changes and does not commit them.
How do I include the android folder?
I am quite new to Idea
I use this Android studio import existing project all the time and everything goes well. Today ,I first create new project which support c++ ,and after every step to the final, I got the error.Picture like below:
I don't know what's wrong,because when I importing existing project ,this error haven't shown.
And the project structure panel like below:
When I check connection in "Http Proxy" ,it returns successful :
Delete the corrupt files
When Gradle files are not completely downloaded or corrupted by some other reason,we have to redownload the files. The easy way is to delete the old files in.
C:\Users\username.gradle\wrapper\dists
Then rebuild the project.
Then Android Studio will automatically download the new files from the system.
I have a project which i have copied from a different completed project,and refactored the package name. after the refactoring and sync was complete android studio asked me whether i wanted to add the newly created files to subversion. i remembered that my previous project was shared through subversion. so i went ahead and disabled the vcs integration for my current project to prevent any accidental modification to my previous project. but now whenever i enable vcs integration on my current project, i am not able to share it as a new project through subversion. i think android studio is holding onto the url of the previous project. so my question is how can i change this? i want to share my newly created project as a new one through subversion. how can it be done?
i remember when i used eclipse, i was used to deleting the CVS directories from my newly created projects which are copied from other ones, and it worked flawlessly. is there any way like this with android studio?
thank you.
I got my answer eventually. the trick was to delete the .svn directory hidden in the root folder of my project. deleting that directory gave the prefect result. and i was able to share my project as a new one through subversion.
I don't know why it change to C++ because I only need Java.
How can I change to Java?
I had the same problem after importing an empty git project. Android studio did not set the project to be a Java project.
I solved this with the following steps:
create a new Java project with Android Studio
copy the generated files to another folder
clone the git repository into the, now empty, project folder
copy the generated files back into the project folder
Though the response is late, I hope this will help others with a similar problem.
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.