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.
Related
I am developing a flutter app for both iOS and Android. When generating the APK, I prefer to use Android studio (my default IDE is VSCODE). However, when I go to Tools > Flutter I do not see Open Android Module in Android Studio option. I do see Open iOS Module in Xcode.
I followed couple of SO answers, even tried replacing android.iml file from a working project. Nothing happened. I re-cloned my project from BitBucket because sometimes the Android Studio was fine when the project is freshly from repo, but this time, that didn't work either.
I Also tried opening the gradle file and looking for the option (as explained in one SO answer), that didn't work too.
However I noticed, few issues.
In the folder structure, the root folder is replaced by the flutter icon. in projects where I have no issues with, the folder icon is folder.
In here I see .dart_tool folder. In working apps with no issue, I do not see this folder.
I do not have an android.iml file. In other projects I did.
Below is my folder structure in a nutshell. Whats going on here and how to fix this issue?
When you don't see any options to
open module in android studio
because of missing .iml files caused by .gitignore file, follow simple steps.
Click on File and choose Open..
Now in the opened dialog choose android folder of example flutter project under your plugin module. For e.g if test is your plugin with example as it's app then you need to select and click Ok
test\example\android
3. Then wait for Android Studio to sync and download necessary jar files.
Simplest solution
Open flutter project
Go to android folder
open manfiest file
On the top right you will see option open module in android studio
click on this option
Solution 2:-
Import your android project as a project in android studio
The easiest way is to use this command in the root directory of your project, it will create some missing files and it will definitely work.
flutter create --platforms=android .
Now just right click to Android folder
I'm trying to open the DeskClockApp (https://android.googlesource.com/platform/packages/apps/DeskClock/) in my version of Android Studio. However, since no gradle files are downloaded, Android Studio is struggling to see the project as an Android-Gradle app.
I've tried downloading the source code as a zip, importing it as Git from Android Studio's VCS, etc. The online repository doesn't have the gradle files b/c the developer added a gitignore for gradle (makes sense). I also considered adding the gradle files myself but the project structure seems to be slightly different than the structure defined online. When I first import that project it says Android Framework detected, however, on configuring it for Android it cannot find any module to run, or even display the correct files (in the Project view). Is there any way to generate the correct gradle files for this? Maybe run it without gradle?
I'm trying to import my project that's hosted on BitBucket using Android Studio. I'm using the VCS -> Checkout from Version Control System -> Git menu option and connecting to my BitBucket account. All files in the root directory of the repo are being imported flawlessly. However, none of the main subfolders (there are about 6-7 folders) are being imported into Android Studio. I've tried everything that I came across via a Google Search but I'm lost as to how to do this now.
I'm assuming I may not have configured my gradle scripts correctly, maybe? I can import the project just fine from my local computer's copy (the file/folder structure is exactly the same on the local computer and my Git repo). Another interesting thing is that the folders are being downloaded to my specified project folder from Git. They just aren't showing up in Android Studio. Any pointers? Thanks!
From : android studio new project missing folders
The problem here is that I assumed android studio would create a module for the application. I assumed this because it asked me at the beginning for app name, module name, package, sdk info etc.
This assumption turned out to be false. You must create your first module manually through File > Project Structure. After that is done, the project explorer shows the files.
Prior to this version it seemed easy to open an eclipse project as-is in Android Studio without any conversion. I prefer the Android Studio environment, but am working on a project that uses eclipse as the main IDE. I'd rather not have to download the eclipse bundle just for this one project.
Is there any way to open an eclipse project as-is, without conversion to the gradle build system, in Android Studio 0.4.3?
EDIT:
It appears that if you use Android Studio's download from source control feature, it'll let you open the project that way. But what if I already have the source downloaded? I don't want to remove it just to redownload it again. It seems like this option has disappeared from the main 'import' wizard.
We're strongly encouraging users to move toward the Gradle build system, and we're in the slow process of making that the only way to create new projects in Android Studio -- you're seeing this now on importing Eclipse-based projects. We'd like to replace all other build systems in use with Gradle, including Ant and the Eclipse internal builder, though the latter two are farther out on the roadmap.
If your ultimate goal is to move to Android Studio, then you might want to reconsider and just set up a Gradle build file. You don't have to adopt the Gradle-style multimodule project structure (which the current Eclipse importer imposes upon you by making a copy of your project); you can rework your build.gradle file to use the Eclipse-structured project in-place. You can get a good start on this if from Eclipse you use the feature to export your project to Gradle build files. It will set up the project in that fashion, though that feature in ADT is a little out of date and you'll need to update the version of the Android Gradle plugin in the build file and the Gradle version in the wrapper that it outputs.
I think this may actually solve your problem. IntelliJ or Android Studio have never been able to use the Eclipse project directly -- they've always imported the Eclipse project and converted to an IntelliJ-style project, and if you later change the Eclipse project, you'll need to re-import into IntellilJ-land. I'm guessing your real desire is to use the Eclipse project in Android Studio without having it make a copy and converting into its preferred directory structure. (By the way, we'll eventually improve Eclipse-to-Gradle import to lift this restriction).
Once you have the Gradle build file in place, you can use it when working with the project in Android Studio, and you'll still have the Eclipse project files when working with it in Eclipse. The big drawback is that you'll have to keep them in sync as you change dependencies and project structure, but hopefully that doesn't happen too often. Even if you weren't using Gradle, you'd still need to keep both projects in sync anyway, so Gradle isn't costing you anything there.
Having said all that, it doesn't directly answer your question, which is how to use the your project without Gradle.
Once you have an IntelliJ-built project, you can open it in Android Studio and use it normally without migrating to Gradle (though I think it does show you a popup when opening the project recommending you do so; you can ignore that). What you need to do is to get that initial IntelliJ project, and once you have it, check all the .iml files into source control -- those .iml files contain all the project information. To get those files, you'll need to import the Eclipse project either in IntelliJ CE, or in Android Studio prior to 0.4.0. Then you'll have your .iml files -- hang on to them.
I'll point out that if you're using Gradle as your build system, we recommend that you don't check those .iml files into source control. There, the build.gradle files are the source of truth for project structure; the fact that Android Studio creates .iml files at all is an implementation detail that reflects that internally Android Studio is still treating this project as an import instead of deriving structure from the Gradle files directly (and we resynchronize state when we know we need to). But saving those .iml files into source control or modifying them directly will lead to confusion or loss of any changes you make there when it resynchronizes.
I think you should give a try to Intellij Idea with ADT Plugin instead of Android Studio, if such requirements are there. Intellij IDEA will support both type of Android projects.
What If I want to move to Android Studio completely sometime?
There is nothing new in Android Studio it is just an IDE based on Intellij IDEA. You can easily switch between Intellij IDE and AS anytime. The only thing is to learn in AS is the new gradle build system. IDE related most of the features are there in Intellij IDE as well.
If you want to move Android Studio start using gradle Build System. That is only the main power of new Tools.
As per your question you don't wanna move your project in gradle then you can have both IDE together like Intellij IDEA at place of Eclipse and Android Studio as well. Msot of the Developer including me having Eclipse along with Android Studio.
EDIT :
I found a workaround to import Eclipse project in Android Studio but I will not recommend you to do this
Look at my answer here
Not Use Gradle In Android Studio
Hi I'm currently working on an android project with a group of developers using both Eclipse and IntelliJ. We're using SVN as our repo. It seems like every time someone using eclipse checks in they break the IDEA people and vice-verse. I was wondering if anyone had any recommendations on what files we should ignore from SCM and any other advice on making this process smoother?
I would suggest keeping IDE specific project files out of versioning. I have few Android projects where I use Intellij IDEA and Eclipse interchangingly and they seem to be playing well with each other.
Here is what I have in the git repository:
.gitignore
AndroidManifest.xml
ant.properties
build.xml
proguard.cfg
project.properties
res/ folder
src/ folder
It's pretty hard to give advice without knowing more details about what "breaks." But I can tell you that for Eclipse you need to have the files .project and .classpath checked in. If there's a .settings directory, that should be checked in also. These files are Eclipse-specific and won't affect IntelliJ or any other tool.
Check out https://github.com/github/gitignore. Just add the IDEs, languages, and frameworks you're using. The Eclipse and IntelliJ ignores are in the Global/ folder.