17 ms·
Android Studio 2.0 Released
- cryptoz 11y agoThis is really exciting! > Finally, the new emulator has rich new features to manage calls, battery, network, GPS, and more. Interesting! I've long wanted more sensor/hardware feature availability in the emulator, so this is a good start. I can't wait to try out the Cloud Test Lab integration. If it works well, that would be awesome (and futuristic). Still looking for official support for WiFi debugging.
- asimuvPR 11y agoWould this mean that I no longer need to run Genymotion?
- brad0 11y agoSupposedly. The new emulator runs at 3x plus you get all that Instant Run goodness that reduces build times.
- monocasa 11y agoYou do if you need ARM. It looks like they just use x86 virtualization by default now.
- whatever_dude 11y agoWith the right architecture (x86, fast virtualization options on, Intel tools installed) GenyMotion is not faster than the current Android emulator so there's no advantage there. On top of that, with the 2.0 emulator, deploy speeds are much faster. Personally I loved Genymotion and used it for all my emulator testing (although the vast majority of my testing was done on a real device). But with Android 2+, it's the opposite: 99% of my testing is done on the default emulator (the rest is using a device). It's that good.
- asimuvPR 11y agoThank you for that feedback. I have been using Genymotion and its been a good tool to work with (no complaints). But being able to use the built-in emulator is simpler and easier when setting up other devs. :)
- nimrody 11y agoWith Genymotion you can run multiple emulators on a single machine. The Intel tools you mention (Intel HAXM for fast virtualisation) seems to work only for a single instance. The second instance does not benefit from fast virtualisation and is painfully slow. Don't know whether this problem has been addressed by this 2.0 release.
- whatever_dude 11y agoA valid point. Haven't used it for bulk (automated?) testing, as I personally never find myself running more than once instance at a time while debugging.
- hebleb 11y agoSome of the apps I work on can only build on ARM, so the emulators were completely useless. Maybe it'll be better now!
- blisterpeanuts 11y agoCloud Test is a great idea -- are they using virtual devices that exactly replicate physical device conditions? I guess they must, to accommodate (probably) thousands of developers simultaneously testing their apps.
- frostymarvelous 11y agoAll I've been waiting for is the damn thing to actually launch and run!
- awinter-py 11y agoany word on how 'warm swapping' compares to buck build?
- whatever_dude 11y agoNot sure if there's any good 'official' link, but: it depends on what you need to replace (adding methods? changing methods? changing resources?). In 90% of the cases it's much faster, maybe by cutting build+deploy time by 90%, just because you don't have to rerun the app. In 5% of the cases it's a bit more involved but still faster. In 5% of the cases it fails miserably and you spend 200% more time just stopping everything, doing a clean build, and deploying it again just to be sure.
- levemi 11y ago> IntelliJ 15 That is not the most recent release of IntelliJ so it's at least one version behind. I should also note that IntelliJ has abandoned the version number name, the newest versions of the IntelliJ IDEs have the year now. The most recent IntelliJ IDEA is IntelliJ IDEA 2016. That such a widely use fork of IntelliJ is behind a version is important for plugin developers who will be held back from adopting new features if they want to support Android Studio. I think IntelliJ 15 shipped with its own JRE so it may be possible to write plugins in Java 8 instead of Java 6 for Android Studio though, so if that's true that's nice.
- chickenbane 11y agoIntelliJ 15 was released in Nov, so we're talking 6 months. What features of IDEA 2016.1 do you need for creating an Android application that aren't present in AS 2.0? I use both frequently and it's hard for me to feel behind (so far). If you're interested in keeping up-to-date, Android Studio also has Chrome-style Canary/Beta/Dev channels as well.
- levemi 11y agoI don't have a feature that immediately comes to mind but I've run into it before when developing a plugin for intellij. It's just something to keep in mind. I don't understand why there's a separate IDE at all, why don't they just make Android Studio and IntelliJ plugin and leave it at that. Then there would be no issue. You can do so much with a plugin. There's really not much you can't change in the UI with a plugin.
- vetinari 11y agoAndroid Studio contains C++ (NDK) support, which is not available in the Idea community edition or other free product. Only in Clion (paid). Having it as a plugin could cannibalize this product.
- pjmlp 11y agoI cannot speak for Clion, but Android Studio it is still a pain to use for NDK projects, when compared with VS 2015 support.
- mikestew 11y agoThe new emulator runs ~3x faster than Android’s previous emulator, and with ADB enhancements you can now push apps and data 10x faster to the emulator than to a physical device. About time. I don't know of any other aspect of Android development that gets as much hate as emulator perf (and I include Eclipse loathing when I say that). Though I'll say on latest with a recent MBP and SSD, the stock emulator isn't nearly as bad as it once was. I am disappointed with a continuing lack of a decent test tools story. Whether UI automation or unit tests, I continue to run into "you need foo to get this to work, but the app's dependency on bar means you'll never get the two live in harmony". Espresso continues to look promising, but ramp up is still steep.
- izacus 11y agoEspresso actually works reasonably well. Unfortunately it still has problem with handling timings and sometimes it just plainly doesn't find views that are clearly on screen and responding to touches. Also it drags in 20k+ methods (whole guava!) which can cause severe problems since instrumentation APKs currently cannot be multidexed or proguarded with Gradle.
- MrBra 11y agoDoes anyone know how that compares to the Xamarin Player? https://www.xamarin.com/android-player https://www.xamarin.com/android-player
- shrewduser 11y agouse the visual studio one (doesn't need visual studio running to be used) or genymotion.
- MrBra 11y agoWhat? Visual Studio uses the emulator from the Android SDK, so I don't understand what you mean by use the Visual Studio one?
- shrewduser 11y agouse the visual studio one (doesn't need visual studio running to be used) or genymotion.
- chinhodado 11y agoEverytime I tried to switch to Android Studio from Eclipse I switched back because of how incredibly slow AS's build time is. Eclipse builds and deploys my app in seconds, AS takes at least half a minute. I tried all the tricks I can find on SO, etc. without success.
- mikestew 11y agoAnd $DEITY help you if you've fiddled with build.gradle. "Please wait five minutes while I go resync a bunch of stuff because you changed a variable name in your build file."
- dave2000 11y agoWe use gradle at work with c++ projects. It's hilarious how slow it is. Why do people use it?
- MaulingMonkey 11y agoBecause it's faster than ANT. (Used it via nVidia CodeWorks for Android when doing a mostly C++ project which also had some Java in it for Android.)
- dave2000 11y agoWhat's wrong with just using a makefile?
- deleted 11y ago[deleted]
- MaulingMonkey 11y ago1) You're stepping outside of the boundaries of what every 3rd party API documents configuring ('add this to your gradle config') when I'm already too much of a bottleneck for figuring out build configuration. 2) You're replacing something that... mostly works out of the box, with something you have to configure entirely yourself. 3) Requires intimate knowledge of the entire Android build chain to properly set up. I might know about ~90% of it after some nasty debugging sessions involving flaky USB connections and commands which return 'successfull' exit codes / stdout spam when they fail - so we'll call the bus factor of that setup 0.9 as my coworkers frankly did not want to know, for which I don't even remotely blame them. 4) Yet another build dependency to install on every dev and build machine (make. *nix isn't an answer either: too many Windows specific toolchains for gamedev to make non-Windows remotely feasible as a primary dev environment.) 5) Not actually solving the remaining bottlenecks. Switching to Gradle got us down to ~5 seconds / build / project for the Java and APK packaging portion of the build, which looked mostly like it was dependency scanning, zipping, and code signing - just like I'd need my Makefile to be doing anyways. I was skeptical that I could do much better. Next, I switched linkers and saved closer to 90 seconds / build / project for even the simplest typo fix in the C++ side of things. And that's just what's wrong with replacing gradle with a makefile. If we wanted to replace the entire build pipeline and build our C++ with makefiles too: 6) Would need to replace extensive existing MSBuild configurations entirely, or duplicate work between two different build setups. Would need to learn other platform build chains sufficiently as well (XB1, PS4, Win8 Apps... I don't recall seeing full docs on this when I still had access, although over the years I pieced together a distressingly large chunk of the pie. We'll optimistically call it 70% of the pie, for a bus factor of 0.7.) 8) Even with dependency files and substitution magic, make will rebuild more than VS with the right settings. I've also only ever done it with GCC - trying to figure out how to coax a proper dependency file out of MSVC's compiler doesn't sound fun. Mixing and matching compilers sounds like an even worse idea - a great way to introduce subtle rebuild bugs due to built-in #define differences. No, I'm not going to try and target XB1 with clang. 9) Poorer VS integration. Simple things like Ctrl+F7ing to compile / syntax check single files won't work without setting up your own keybindings to (ab)use e.g. "External Commands". That might be most of what's wrong for my use cases.
- vdfs 11y agoDoes this support 32 bit linux?
- Normal_gaussian 11y agoWhy do you want 32bit linux support? (not hating, just curious)
- vdfs 11y agoI'm using ubuntu LTS, 32 bit is working good for me, only google chrome and newest Android SDK is missing. I will switch to 64 bit when the next LTS is released.
- vinc 11y agoMy computer from 2009 is limited to 32-bit but it's still working fine so I'm reluctant to throw it away. I guess I'll have to now.
- dcdevito 11y agoNot a moment too soon, especially considering I would probably save time using Xamarin in VS from start to end now.
- therealmarv 11y agoOS X: just wanted to start my 3 weeks old Android Studio to update and realized it wants Java 6 from Apple. Is this normal? I have Java 8 installed here.
- Ambroos 11y agoApple's Java 6 uses Quartz for text rendering, which looks really good and is pretty fast. Oracle's Java 7/8 do text rendering in software, which is slow and looks extremely bad on OS X compared to, well, everything else. It only uses Java 6 for the IDE, Gradle and the other Android tools should still run with your regular modern Java 8 if I'm not mistaken. It's not ideal, but after comparing the two I found Java 6 + Quartz by far the best solution for now...
- therealmarv 11y agothanks for the long explanation!
- biafra 11y agoDid you try the openjdk that is bundled with intellij idea eap builds? It is Java 1.8 with quartz font rendering. I use this version since December last year to run AS without any problems.
- DCKing 11y agoIt's great that they improved Android emulator performance. Major frustration when developing Android apps is all the time spent waiting for the emulator or device deployment. What always mystifies me about Android development is that there's no equivalent of the iPhone simulator (not emulator) of iOS development. I mean, Google has a perfectly fast Android runtime that allows you to run apps directly on your desktop at native speeds. It's currently built into Chrome OS, is already cross platform [0], and while it obviously doesn't give you to access some phone hardware features, it should be perfectly adequate for 90% of development scenarios. Why doesn't Google leverage that for click-and-run Android development? [0]: https://github.com/vladikoff/chromeos-apk/blob/master/archon.md https://github.com/vladikoff/chromeos-apk/blob/master/archon...
- gregschlom 11y agoI may be totally wrong on this but I was under the impression that since Google started publishing x86 builds of Android the "emulator" is now much more like a simulator (unless you choose to run the ARM version, of course). The thing that makes the emulator really slow is when it has to emulate ARM instructions on an x86, but if you pick an x86 arch then you're basically just running a VM, which should be comparable in perf to the iOS simulator. Again, just guessing here, please correct me if I'm wrong.
- umanwizard 11y agoThe iOS simulator isn't an emulator, though. It's running the apps as regular, native process on the OS X host. There's no VM. The perf difference isn't as major as between x86-on-x86 virtualization and arm-on-x86 full blown emulation, but the difference is still there.
- rubber_duck 11y agoIs virtualization cost that bad ? If the GPU drivers are good it should not be over 2-3x - which - when considering you are emulating mobile phone on a at least 2-3x more powerful hardware - should be perfectly acceptable. ARM emulation is probably an order of magnitude slower
- iLoch 11y agoGlad to hear emulator performance has improved so drastically. Did the Android team take the time to tackle the, what, 5 year old bug that prevents retina computers from seeing the screen clearly yet? Kinda of a huge pain in the ass and makes me groan whenever I have to start the emulator and test my Android apps.
- iLoch 11y agoUpdate: Yes they did! Wow, what an improvement!
- dmritard96 11y agoDid you see the compile to iOS plugin, thats so cool! OK just kidding. But seriously waiting for it.
- z3t4 11y agoFor those getting lost in the IDE I recommend trying command line. Here's a good tutorial: http://geosoft.no/development/android.html http://geosoft.no/development/android.html (you'll have to change some file paths due to SDK path changes though, just search for the executable) I find Android development very tedious though (compared to web-dev) both with and without the IDE. Especially the xml-files and "enterprise" Java code.
- brad0 11y agoThis is really outdated IMO. Why not just build using latest and greatest with gradle?
- perezdev 11y agoChange is hard.
- z3t4 11y agoI use a bash script.
- adevine 11y agoUsing gradle, especially with how it integrates with Android Studio, is a much better solution. Google really got it right with gradle IMO, in that building from the IDE builds EXACTLY the same as if it were built from the command line with gradle. Building manually with bash like this just seems masochistic.
- w8rbt 11y agoWe've used the beta releases for a few small class projects already with good results. No major issues.
- virmundi 11y agoHow does this compare to running Android in VirtualBox via osboxes.com? I pretty much have to do this in order to make my setup work (unless I want to use my phone for testing). I have ArangoDB running in VirtualBox to provide backend data. If I try to run the emulator, I can't because VirtualBox and the emulator don't play well. The only think I've found to get the emulator to work is to use an ARM version of the emulator, which makes it hard to use. An all VirtualBox setup works fine. I'm not sure how to make the emulator phone like rather than tablet. Other than that, I'm ok.
- jorgec 11y agoI am been using the 2.1 canary (beta) version for a long while that i didn't noticed about the new version. However, in sum, using a emulator is still a bad idea.
- lostgame 11y agoMan, I just grabbed Studio today to install on my new MBP, and I was baffled to see it had completely changed from the version I had installed on my old one like...two days before? Way to surprise me.
- whatever_dude 11y agoThe "stable" versions take a while to be released. The previous stable, 1.5, was released in November 2015. The new one, 2.0, was released today. For some people it may make sense to use the Beta, Dev, or Canary versions instead. Those, of course, have much more frequent updates (some near daily).
- namelezz 11y agoHow fast is the new emulator compared to Genymotion[1]? Is intel HAXM still required? [1] https://www.genymotion.com/ https://www.genymotion.com/
- kryps 11y agoNot sure about the speed compared to Genymotion. HAXM is still required but less buggy now.
- orbitingpluto 11y agoWhat's with the handholding when downloading? I'm trying to download the Linux version on a Windows machine and it keeps trying to force the Windows version down my throat... spoofing my user-agent fixed it.
- vetinari 11y agoJust scroll down: http://developer.android.com/sdk/index.html#downloads http://developer.android.com/sdk/index.html#downloads
- orbitingpluto 11y agoOh sure I could do that. I could also fix the vacuum by plugging it in. (Dammit. I was not on a FHD screen and that isn't the first time I've made an above the fold mistake like that.)
- esilverberg2 11y agoI was very excited for the improved emulator, but I also run Docker to simulate my app server, and the Android emulator does not run simultaneously with VirtualBox. Sticking to GenyMotion I guess...
- johndoe90 11y agoAFAIK they used modified version of QEMU to run Android. Will the speed enhance take any effect on the base QEMU? Or there were just OS optimizations?
- rewqfdsa 11y ago.
- vanderZwan 11y agoDid you actually mean Windows Millennium Edition, or was that a typo?
- swsieber 11y agoI've seen some venting in the comments here about Gradle and general build times. So I thought I would mention Buck[0] as an alternative build system. Vine as a great article up about how they sped up their build when switching from Gradle to Buck[1] - a large part of that was due to Buck's exopackage[2] feature. For the curious, Google has a system like Buck - Bazel[3]. From what I know it served as the inspiration for Buck, but I could be wrong. [0] https://buckbuild.com/ https://buckbuild.com/ [1] http://engineering.vine.co/post/117873038742/reducing-build-times-by-adopting-buck http://engineering.vine.co/post/117873038742/reducing-build-... [2] https://buckbuild.com/article/exopackage.html https://buckbuild.com/article/exopackage.html [3] http://bazel.io/ http://bazel.io/
- on_and_off 11y agoAs I understand it, some xooglers missed blaze/bazel so much that they built copies in their new companies -> bucks & pants.
- fulafel 11y agoHow feasible would it be to run your own virtual Android device on a VM and access it remotely like VNC or rdesktop? This could be nice for running clients like WhatsApp or Snapchat and accessing them from a real computer with less privacy worries to boot. (Yes I know there are per app ways you can often archieve this if you tinker around enough, not the point)