Hacker News new | past | comments | ask | show | jobs | submit login
IntelliJ IDEA 13 Brings a Full Bag of Goodies to Android Developers (jetbrains.com)
147 points by rdemmer on Dec 11, 2013 | hide | past | favorite | 101 comments



Has anyone tried using Kotlin for Android development? (it's supposed to be lower runtime footprint than Scala, and it is officially supported by Jetbrains [1])

[1] http://blog.jetbrains.com/kotlin/2013/08/working-with-kotlin...


Kotlin works well for Android development. The annotations have gotten better recently, too, so you can interact with Android classes without too many null checks.


Version 13 is very awesome. We've been finishing our intellij plugin and are so close to having it be usable that it could be user ready in like 2 days which will be awesome because then I can spend more time using the new intellij. I'm also glad they fixed the git colors in the Darkula theme.


Want to like IDEA, but using a Java (Swing) based UI, in both Mac and Windows, makes me always feel like when someones scraps a blackboard with his nails.

I could live with Eclipse though, despite SWT being also quite removed from the native experience. At least it had bloody native text boxes and scrollbars and such.


> I could live with Eclipse though, despite SWT being also quite removed from the native experience.

How can SWT be removed from the native experience when it uses native widgets everywhere, as opposed to Swing, which reimplements them all in Java (the reason why Swing apps are so ugly and feel so non native)?


I had that feeling using eclipse and netbeans for years before switching over to IntelliJ.


What OS do you use? Because Swing is especially shitty on Linux, so I simply can't switch.


Ah yeah. It looked really bad on my ubuntu box. Moving to OSX was a help



Trust me it has less issues than SWT. Such as https://code.google.com/p/dart/issues/detail?id=13819


The global menu was a bad move on the part of Canonical in Ubuntu's Unity desktop. I don't even use it or that ridiculous scroll bar. I keep those packages removed on my systems so my Unity experience is closer to Gnome and Eclipse and other GUIs that had issues with those UI elements also fair much better.

Either way, that has to do more with issues in Unity than in SWT. What SWT accomplished is amazing:

http://www.eclipse.org/swt/


Java also hates Xmonad (I spent ~30 mins trying workarounds and then gave up, as each time it went wrong, I had to restart my session)


I haven't messed with my xmonad.hs in a long time, but adding

  setWMName "LG3D"
to my startupHook fixed most of the issues for me.


I had to install kde as I couldn't get matlab working in xmonad. Found out about this fix only recently.


Another thing worth a try: export _JAVA_AWT_WM_NONREPARENTING=1

Worked for me last time I checked (Arch, xmonad 0.11-7, openjdk 7.u45_2.4.3-1, intellij-idea-community-edition 13-1)


what was the issue, are you using openjdk or sun/oracle jdk?


That's exactly the reason why I've always returned back to Eclipse. I just hate Swing. It's slow and ugly on Linux.


I use it in both environments and have no issues with the L&F.


You might find some tips in here: http://youtrack.jetbrains.com/issue/IDEA-57233


I think this answer could help you: http://programmers.stackexchange.com/a/24231


NetBeans is Swing, too, and looks quite beautiful and native.


As someone who has used Eclipse, Netbeans and IntelliJ for years I can say that without a shadow of a doubt that IntelliJ is far ahead of the other two.

The only areas where Netbeans is ahead is built in tools for profiling tools and heap dump analysis, and wizard for visually creating a GUI. I can't think of a single area where Eclipse is better except perhaps number (but not quality) of plugins.


Netbeans' profiling stuff is separately available as VisualVM, and has decent plugin integration with IntelliJ.


Does the plugin version also support remote profiling the way Netbeans does?


>> As someone who has used Eclipse, Netbeans and IntelliJ for years I can say that without a shadow of a doubt that IntelliJ is far ahead of the other two.

Wow it's like different universes. In mine, Eclipse and even NetBeans are far ahead of IntelliJ. The Eclipse maintenance staff has a bit of a cocky attitude but Eclipse is rock solid, mostly. At least, I can forgive its warts.


What do you see as the advantages of Eclipse over Intellij?


For me it's SWT - on Linux it's faster, the look & feel is consistent with the environment, and most importantly - font rendering. Fonts look really shitty in IDEA / Linux.


Recently using IntelliJ on Linux and fonts got better with this:

http://superuser.com/questions/614960/how-to-fix-font-anti-a...


My only wish for Eclipse is that it doesn't have Eclipse as a build dependency. However weird that may sound.


How is this useless comment at the top?


It got there by expressing a common sentiment.

Now, what business does your content-less (and insulting to top) comment has on the thread at all?


Other than "multi device preview" I think Android studio has all the features that IDEA13 offers for android developers. IntelliJ is great and I do all my Java/Groovy based development from it, but I'm not sure about buying the license just to go upgrade to 13


Android Studio is basically the community edition of Intellij, but I would consider it to be more stable.


The Sqlite debugger is also IDEA13 only I believe.


Isn't that the thing that requires the Ultimate Edition? That's why it is not in Android Studio.


Database support has always been an Ultimate Edition only feature. However, nothing prevents someone from building their own plugin. For example, there's a third party one for MySQL that's fairly popular.


I really want to like Intellij since it is so much more responsive then Eclipse, but I can't for the life of me get a working scala set up in IDEA or in the community version. Eclipse might still be a bit of a sloutch, but it works.


What issues are you facing exactly? I've been successfully developing Scala apps since IntelliJ 12 with no issues. It's leaps and bounds better than Eclipse. One thing to note that for sbt-based projects, I recommend generating the IntelliJ project from https://github.com/mpeltonen/sbt-idea


Getting it to work with SBT. Even generating the project with sbt idea I still can't get it to compile correctly. And I still haven't been able to get it attach a debugger.

I think the current issue is with SBT 0.13 which isn't supported by them right now.


I'm using SBT 0.13 on a fairly complex project. Not sure why it wouldn't work for you. What kind of project is it? Any specific frameworks you're using that are causing compilation errors?


Play2 pulling it in via SBT resolution so I don't have it "installed" on my development machine.


Are you doing "sbt idea" or "play idea?" From what I recall, "sbt idea" was broken, while doing it using the play launcher works, as they have some broken dependencies.


I use sbt idea. I can try play, but it would be great if it just worked.


Thing is, it does just work...if you follow the directions Play gives you once you create a new project. Namely, to use their play wrapper around sbt.

(I am not saying this is a good idea, but I am saying it "just works".)


In my experience the problem is usually sbt related. I found IntelliJ to work great with scala+Maven.


I just recently started doing some Java development (despite vowing never to again), and one of the reasons I'm kinda cool with it is Intellij. Intellij makes it way easier. Things just work (subversion, Spring, hot swap).


>> Things just work (subversion, Spring, hot swap).

The same has been true for me in Eclipse for over 8 years.


Two things that do not "just work" first drove me away from Eclipse:

a) git integration. Egit is bad and barely functional. I ended up abandoning it and doing all my git interaction at the command line. I rarely need the git command line with IDEA. b) Maven integration. We use a custom Maven setup that I could never get Eclipse to work properly with; it insisted on using a stock setup that could not build our projects. IDEA's Maven support just works; I run the Maven goal from the sidebar and it runs in IDEA just like I typed "mvn <rule>" at the command line.

I still use Eclipse for C and C++ development, but I will probably abandon it for even that soon. I have just never been able to get into Code::Blocks.


If you love IDEA, you may well get the chance to use it for C & C++ soonish, as well, since they're working on a C & C++ IDE now. Hopefully it really will be good for vanilla C - I have an aversion to C++, and little need for that support.

The lack of native development is one of the main things keeping me from giving IDEA a proper try. It may well be better than NetBeans, but NetBeans works well now, and has decent C & C++ support (at least as good as CDT, anyway).

I do have a personal license for IDEA 12, and would have no problem paying for an upgrade to 13 - it's just not worth my time (yet) to do so.

There are a few annoying bugs I've run into in NetBeans 7.4, and Android dev isn't awesome in NetBeans, so maybe there'll be enough impetus for me to give IDEA a real shot soonish.

Or the NetBeans bugs will get fixed, and I'll just stick tight. I'm happy either way!


Weird, I have the exact opposite feeling about git integration. I'm okay with the Egit functionality but I always use the command line with IntelliJ because the git support gives you no way to interact with git's staging area.


Why not use Qt Creator?


Every time I try to use Eclipse I give up in a rage of frustration and go back to Intellij. I have always found Eclipse slower and buggier than Intellij. I'm sure a lot of it is the devil you know.


The only feature that really excites me is the Gradle support. Things like the 9patch editor seem horribly misplaced (you probably don't want your devs to be editing those...) and others seem so situational (the autocompleting sdk version - a one line config value that you set once per project).

Android Studio is not really usable as an IDE if you want to have a fully featured test suite because of the weird, half-implemented Gradle "auto-sync" magic (http://www.sep.com/sep-blog/2013/10/17/android-studio-not-re...). Until then, it's still good ole' reliable Eclipse (I can't believe I just said that). Until a different IDE can support Robolectric and Robotium/Instrumentation tests in the same projct that can be run/debugged inside the tool and report results in a window (command line and html test reports don't count, sorry), I won't be switching.


Weird, I know we have Robotium and Robolectric working fine in Android Studio at work. Although some versions do require a separate project, most versions are just sub-projects under a main folder with a shared build.gradle now. Not than any of us want to use it. You are just forced to if you want to use the latest features like AARs with Gradle. Eclipse is unfortunately obsolete and incapable of handling the latest stuff, even though we all used it for years and prefer it.


Last I checked (October) I could not get the build.gradle to play nicely. Most of the other material online involved using instrumentCompile to trick Android Studio into running your unit tests and a custom runner/plugin: https://github.com/JakeWharton/gradle-android-test-plugin

If you have gotten it working in Android Studio, I'd be very keen to see how (if you are willing to share).


I followed: http://www.peterfriese.de/android-testing-with-robolectric/ I can't get it to run a specific (gives junit 3.8+ required error), but am able to run the whole suit.


I'd also be very interested in learning how to set up Android Studio to run Robolectric. Especially sinceone of the last releases removed the option to mark custom directories as test folders, so tat I now can't even use any Java features in the editor.


I'm curious to know what you like about gradle.

A few months ago I had a chance to work with gradle and it looked to me like it was a step away from declarative project descriptions, back to writing loops to iterate through files, etc. Possibly I was using it wrong, but I've heard great things about it and perhaps my expectations were just too high.


> a step away from declarative project descriptions

Exactly why I like it. The delusion that build scripts are 100% declarative is one of those things that makes me hate tools like Ant etc. with a passion.

Parts of build scripts can be declarative, but the ability to break out and put imperative logic in some section where you need it is crucial. And the nice thing about Groovy (which Gradle is based on) is that you can usually do it in a very declarative way (eg: files*.delete() rather than looping, etc.)


When you run into the cases it is much better to write a plugin than to put imperative code into your build. Gradle builds are IMHO a huge step backwards for others trying to use someone else's build.


Really? You think someone will find it easier to go look at the source for my plugin rather than just a line of imperative code in my build script? I would agree it easily gets out of control, but I really don't think I would rather have to find and understand a whole plugin just to grok a one off piece of logic needed in the middle of a build script.


Generally, the imperative code isn't as flexible in different environments. For instance, if you look at the Gradle file for Gradle you'll find tons of stuff very specific to their actual computers they use to do the build. That is the opposite of what I want in a build file intended for third parties or even for medium teams.


> Things like the 9patch editor seem horribly misplaced (you probably don't want your devs to be editing those...)

Um, what? I can think of plenty of times when I've needed to edit 9patches myself. Mind you, most of those times were when I was working in a startup, and we didn't have a dedicated UI/UX person, but this feature would still be incredibly handy.


You probably know this already..if you hack up the build.gradle file you can get full android gradle builds in Eclipse, even testing and yes both ways..using regular android TDD with new espresso and Robolectric/Robotium.

Yeah some blog posts are coming soon


Like maybe idea 13? That's how we do it at least.


If IDEA 13 supports that, then great! Would love to see a blog post describing your setup.


I am confused about how the IntelliJ IDEA with android plugins competes with Android Studio. I thought that Android Studio is suppose to replace IntellyJ for android development.


Android Studio is built off of the codebase[0] from IntelliJ 13. The JetBrains products like RubyMine, WebStorm, and seem to be built off of the same core IDE with plugins for languages/platforms and features. So most of the functionality is really just in plugins, and of course IntelliJ probably offers additional Android development functionality for a price.

[0] http://www.jetbrains.org/pages/viewpage.action?pageId=983211


Android Studio is a fork of the OSS IDEA by Google. IntelliJ IDEA is the version released by the actual company and is not affiliated with Google.


IntelliJ IDEA and Android Studio FAQ: http://bit.ly/1d7U0Kg

Q: Is Android Studio a fork of IntelliJ IDEA?

A: No. Android Studio and the Android plugin for IntelliJ IDEA are built from the same code, and all of the changes in Android Studio are, and will continue to be, available in IntelliJ IDEA releases.


It's a fork in the sense that it's a fork of the IntelliJ repo with Google/Android related assets added. So it's more of a branding fork than a code fork, but since its in a different repo I'd still call it a fork. But it's just terminology I guess.


But that ships with IntelliJ IDEA, so it isn't a fork. Android Studio is a subset of IDEA 13.


These resources might help:

IntelliJ IDEA is the base for Android Studio, the new IDE for Android developers: http://bit.ly/1jN1bgb

IntelliJ IDEA and Android Studio FAQ: http://bit.ly/1d7U0Kg


Does the Android Studio canary build get new features before IntelliJ?


I really hope the Gradle support is ported to Eclipse and that the Eclipse Android tools are actively maintained. I tried Android Studio but it’s completely inaccessible with my screen reading software. Since it is based off IDEA I assume I would run into the same problem trying to use the new version so haven’t bothered.


After trying to use Android Studio with its Gradle integration behind a company firewall that requires all outside network access through the proxy, I just gave up and went back to Eclipse, where everything just works. Diving through different configuration options was just to painful to put up with.


Personally I think "doesn't work like Eclipse" is a good thing. If you don't mind trying again go to http://www.jetbrains.com/idea/documentation/migration_faq.ht... first. You will also find CTRL+SHIFT+A combo useful - it's a fast search of settings/actions.

Properly set IntelliJ will boost your productivity many times. It's just an investment if you migrate from other IDE. I like to think about it as something similar to migration from crappy unit testing solution to a better one - it just pays off after some time.


Is the gradle support really better than in IDEA Community Edition?

Sure I can open the gradle.build file and edit it with syntax colorization but there is no smart auto-completion: you always see a giant list of objects, and not all of them are available.


The Gradle support is a part of Community Edition. Code completion should be available for dependencies and plugins (available in the Maven central). I've seen a few cases when there were no completion for the artifacts from the local Android repository. It will be fixed shortly.


Does anyone know a good software to create these kind of "screenshot gif"? I know my question is not directly related to the content of the article..


LiceCap is a great tool, and opensource: http://www.cockos.com/licecap/


What a terrible name for a project.


The XML code formatter (shilf+alt+L) is very strange. Maybe bugged. Eclipse does a better work.

E.g. http://youtrack.jetbrains.com/issue/IDEA-103320


I'd like to try an IDE, since I usually end up using vim due to the fact that my projects often mix languages (Python, C, Clojure, occasionally Scala). How do Intellij, LightTable, SublimeText, etc. perform on those sorts of polyglot projects?


Thank God for IntelliJ because Eclipse is the biggest steaming pile of shit excuse for an IDE.

I'm really glad Google is ditching Eclipse as the go-to IDE in favor of the IntelliJ-based Android Studio. Good riddance.


I wish, they would have a free and lightweight version of the IDEA, so i could use it instead of Sublime Text.


You mean the open-source community edition that actually exists?


Not really actually. With the free community edition, you only get to manage "java" which doesn't work for me since i work with different programming languages with lots of front-end stuff as well. I meant to use it from editing xml, css, html to configure tomcat settings for example. On the other hand, i totally understand that they want people to buy it for fully featured version.


IntelliJ is indeed java-centric (and not light-weight), but the front-end coding environment is top-notch. I've tried going back to a light-weight text editor (I'm still a sucker for TextMate) but I always come back to IntelliJ. The code completion for HTML/JS/CSS is phenomenal, and the way it intelligently switches syntax highlighting schemes regardless of filetype cuts down on my numerous, numerous typos (for example, if in app.html you write <div style="foo:bar" onclick="foo('bar')"></div>, the HTML, CSS, and JS components will all be syntax-highlighted appropriately). It's also great for XML.

(I also happen to work on an app with a Java backend so it's a no-brainer, and the company's paying for the software...)

EDIT: Just realized you were referring only to the CE, which I've not used. I'll leave this here as a _non-sequiter_ opinion on the paid version nonetheless.


Perhaps it's worth paying for it for you? Calculate how much your time is worth, and compare to how much more productive you would be.

I'm using the free version, since I'm only doing Java, but I truly think IntelliJ IDEA is great[1], so I would pay if there was no free version.

[1]: http://henrikwarne.com/2012/06/17/programmer-productivity-em...


Eclipse is fully featured and professional and free as in beer and software.


"Fully featured" is not a binary condition. If Eclipse is fully featured for Java development, IDEA is much MORE fully featured.


IDEA Community Edition is free and perfectly usable


For what? Java SE? What else?


Java SE. Scala. Kotlin. Groovy. Clojure. If it's on the JVM, it works. (If you are expecting to use it for application-server development, there's no problem in expecting enterprisey-you to pay the man.)


I hear you, IDEA is awesome but quite heavy, most IDEs are today as they are built on languages that run on vms. I tend to have one heavy IDE and a lightweight text editor opened at the same time. That's the best solution.


The more comments about IntelliJ IDEA I read, the more it reminds me of apple fans... It's just a tool and not a miracle! But hey, everyone is special and has the right to opinion, right? :)


coding is our jobs. The IDE is our primary interface. Of course its important. Its much more of a vital decision than what looks good (apple fans), its about what gets the most real work done.

Look at vim Vs. emacs for a better analogy.


>Its much more of a vital decision than what looks good (apple fans), its about what gets the most real work done.

Jeez, talk about responding to a fallacy with a fallacy...


What are you talking about? I use IDE everyday and I'm not questioning the importance of IDEs, i'm questioning the fan base :)

All I'm saying is that the whole "it's worth paying extra", "it's so much better and productive", "it has so many features"... is just bs... IMHO. Use right tool for the job and be open minded, that's all. If I have to switch to go lang tomorrow, should I start complain, whine and wait for IDEA for go or just do whatever I have to do?

And you cannot compare vim vs. emacs anology with this one, since hey both are free and open source, however IDEA is just a good commercial product, but not a silver bullet, that's all.


I don't think there will ever be silver bullets. :)

IntelliJ has a community version with the source posted over at GitHub. They also have a flavor for Python which recently had an open source version released. But as you said, to each his own.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: