Live data from Hacker News

Android Studio 2.2

android-developers.blogspot.com

71–80 of 81 posts

Re: Android Studio 2.2

#71
post #21

Earlier quoted context omitted.

I spend about 80% of my day in Android Studio and It's definitely resource hungry. On my brand new MBP 13" with 16GB RAM and an i7 processor it can still make the whole thing stutter when compiling a medium to large project. At work my desktop can handle it, but that thing has pretty unrealistic specs.

It is not the IDE per se (300 MB RSS or so), but Java allocating some 2 GB heap per process, which also includes gradle daemon and compilers. This can easily eat a bunch of ram, making the OS swap. Seems OS X has extra bad policy of swapping.

I gave Android Studio 8GB of heap space to play with, and it still manages to run out. WTF.

Re: Android Studio 2.2

#72
post #19
post #3

I tried many times to get into android development but everytime I get put off by the complexity of the api. The amount of digging in documentation you need to do in order to implement the simplest functionality scares me. Is anyone else feeling the same way? And does anyone know if it gets better with time or is it a constant struggle?

I've been doing Android development for ~6 years now. For the last 2 years I've been doing it full time at Google (not on the Android team). Your first impression is correct. There is a LOT to know and I am still learning new bits every day. And yes you do find most of it out by digging around in the docs or on StackOverflow. That said, it's an amazing platform to explore because no door is fully closed. Android will…

That's true, as long as you don't have to support >50% of the users of Android. As someone (at this moment) still dealing with the very healthy supply of Android 4.4 phones being sold as "new" in Europe, I can only dream about actually using the fancy APIs someday.

Apple may be closed down, but I've never had to target anything less than current_version-1.

Re: Android Studio 2.2

#73
post #32
post #2

I've dabbled in Android dev, but have always lagged due to not really liking Java. Android Studio was a pleasant experience for me when I tried it this year, and now that C/C++ NDK support is better in this release I am going to give it another go. I almost feel like I should just go completely Android given the numbers of devices out there is overwhelming compared with Windows/iOS/OS X combined. I will keep up with…

Just be aware that C and C++ are really meant for programming games, bringing code from other platforms or improve performance. Trying to write an app that isn't a game will make you enjoy the pleasures of JNI calls, given the APIs exposed to the NDK.

If no one used it, they wouldn't be adding better support for it.

The NDK is pervasively used by many many applications; that's why it's getting more support.

For some reason this seems unpopular with the android team, who seem to keep trying to avoid the issue when ever its raised at I/O...but hey, clearly at least someone is paying attention to what the statistics are showing.

Sure, it's some extra hoops to jump though; but shared business logic that you can use on any code base on any platform; that's a really really compelling reason to use the NDK, or one of the stacks based on it (eg. Xamarin, react native).

It's not just for some edge case. The biggest players in the field are doing this.

I think it's misrepresentative to try to characterize this as 'just for games'...

Re: Android Studio 2.2

#74
post #9

I tried Android Studio around 2 years ago. Is the emulator any better? It used to bring my computer to its knees.

Running a real ARM emulator is still slow but for most things running an intel emulator with haxm will be fine. An actual device will be faster but the emulator will be suitable for simple test

You can use Genymotion is which pretty quick even on my Macbook Pro 2011 machine.

Edit: Looks like it's not longer free.

Re: Android Studio 2.2

#75
post #3

I tried many times to get into android development but everytime I get put off by the complexity of the api. The amount of digging in documentation you need to do in order to implement the simplest functionality scares me. Is anyone else feeling the same way? And does anyone know if it gets better with time or is it a constant struggle?

after 6 years writing Android code I still struggle, specially with anything UI related. I do as well web and Qt which I find vastly superior in terms of user interface creation. If you stick to "material templates" you are ok, but as soon as you want to do things a bit differently is a pain in the ass... Theming is just horrible, and having xml files and images scattered everywhere using flat herachies is a bit anno…

Maybe it was 100ms once upon a time but that is simply not true now. http://www.androidpolice.com/2015/11/13/android-audio-latenc...

Re: Android Studio 2.2

#76
post #61

Earlier quoted context omitted.

Some things are much more sane and well thought out than iOS. Styling and layouts, for example, are so much better than Interface Builder, which is pretty much just a toy for demos. Other things like the way events are handled and some of the native widgets are clunky. Some of us are fed up enough with all the incidental complexity Apple puts in your way every day as a developer (provisioning, in particular), that we…

> Interface Builder, which is pretty much just a toy for demos As somebody currently learning the basics of iOS development, what do people use as an alternative?

As someone learning the basics of iOS development, I'd suggest you stick with IB. I get that most people either love it or hate it but there will never be a WYSIWYG editor that everyone will be happy with and there are ways it's lacking. But to call it a toy for demos is simply over the top. I've personally made pretty complex interfaces using iOS's auto layout using very little UI code.

Re: Android Studio 2.2

#77

Earlier quoted context omitted.

after 6 years writing Android code I still struggle, specially with anything UI related. I do as well web and Qt which I find vastly superior in terms of user interface creation. If you stick to "material templates" you are ok, but as soon as you want to do things a bit differently is a pain in the ass... Theming is just horrible, and having xml files and images scattered everywhere using flat herachies is a bit anno…

Maybe it was 100ms once upon a time but that is simply not true now. http://www.androidpolice.com/2015/11/13/android-audio-latenc...

it keeps been true. that article refers to "superpower" which is a technology developed by a third party that hacks the android audio subsystem for certain models, so its not general. I have like 30 android models ranging 2.1 to 6.0 for testing and never saw any working below 100ms and the majority of them going to 200 or 300ms...

Re: Android Studio 2.2

#78
post #69
post #48

Earlier quoted context omitted.

I think this is mostly due to the lacking visual editor rather than virtues of the underlying XML format.

Seriously? In a thread about Android Studio of all places?? https://developer.android.com/studio/write/layout-editor.htm...

I was using Android studio from beta until the early 2.x series. It has been some time but there were indeed many cases in which I had to go dig in the XML representation of the UI file. I do hope and believe it is getting better.

Re: Android Studio 2.2

#79
post #32

Earlier quoted context omitted.

Just be aware that C and C++ are really meant for programming games, bringing code from other platforms or improve performance. Trying to write an app that isn't a game will make you enjoy the pleasures of JNI calls, given the APIs exposed to the NDK.

If no one used it, they wouldn't be adding better support for it. The NDK is pervasively used by many many applications; that's why it's getting more support. For some reason this seems unpopular with the android team, who seem to keep trying to avoid the issue when ever its raised at I/O...but hey, clearly at least someone is paying attention to what the statistics are showing. Sure, it's some extra hoops to jump th…

Personally I think they were forced to do it from the games industry, just like it happened with Windows Phone 7, which only allowed pure .NET applications.

However the Android team, which is composed by quite a few ex-Sun Java team members, seems to not share the same love for C++ as Microsoft or the even their own Google clang team do.

While I appreciate the safety we get from Java as the Android main language, Symbian, iOS and WP all managed to have native sandboxes.

> I think it's misrepresentative to try to characterize this as 'just for games'...

I don't think so, because although we are able to use the NDK for coding apps, that is clearly not what the Android team wants to allow us to do, given the list of official APIs, which are all to game development related, even POSIX is only partially supported.

Now in Android N there are changes in place to prevent linking to platform libraries written in C or C++ like libpng and Skia.

It is ironic that we are forced to use JNI to make calls into those platform libraries via their Java bindings.

Also I don't believe that if Jetbrains hadn't decided CLion would be a worthy product, the Android team would have spent any effort to improve the life of NDK developers stranded with their decision to drop Eclipse CDT without any alternative.

Re: Android Studio 2.2

#80
post #44

Earlier quoted context omitted.

Have you tried Kotlin ? It does a really good job at fixing java's issues and since it outputs bytecode, you can write entire Android apps with it without writing a single line of java.

Not in a year, but it wasn't different enough to me - less verbose, but the same when I long for a Lisp or ML or Haskell for Android! Scala was a thought. And I am now looking at F# again with the recent OS works by MS and the Xamarin situation. As I wrote downstream, I just need to commit to Java (or Kotlin!) I think!

Well, Scaloid is a thing, so you might want to check it out. AFAIK, it is not really popular for Android development, but it makes some people really happy, like predictive keyboards creators.

As for Xamarin, it really depends on what you want to do. If this is just a hobby project, well go for it. Otherwise, the only use case where it is really interesting is when you need to write an app for both iOS & Android on the cheap.

Post reply on HN