Increase Android development speed - android

being a Java/Linux advocate, and having programmed my first Android app a while ago, nowadays I'm building a similar one this time in WPF (it's likely to be run in WP7). I have to admit that so far Eclipse/ADT seems to be no match to VisualStudio 9 in regards to development speed. The latter excels in the build/run speed cycle (it's obvious being Eclipse a java based app). Being my development HW an i3 laptop/4GB RAM/Win7 x64, my questions are:
Could I get a similar development speed I have today in VS9 in the "Android" environmnent if I had a state of the art processor (i7 ?)Would I have a performance boost if I worked in a Linux partition in my laptop?
Any additional hints are welcome.
Thanks

The primary reason ADT feels bulky and slow is because it is constantly rebuilding in the background. This proves useful when showing compile errors and warnings as you type, but when working on larger projects—especially when making changes to the manifest, XML files (including layouts, drawables and strings) and resources—the IDE will regularly lock up with a build progress bar, as some changes require a rebuild to complete.
You can disable automatic building via the Project menu. I use this regularly when making changes to layouts, but enable it again when writing code.
As for hardware: it appears that aapt runs only on one core, and from my experience, it runs noticeably faster on faster cores vs. more cores. (This is anecdotal, since the comparison here is a PC with two 2.11 GHz cores vs. a laptop with two 1.8 GHz cores.)
A colleague uses Linux for development; I'll inquire if he has noticed any speed increase since switching from Windows.

Related

Is 12 Android emulator safe for PC?

In Android Studio (version: Android Studio Dolphin 2021.3.1 Patch 1) before downloading virtual image with Android 12 (API 33, Tiramisu) I had to agree to the license agreement that start with the following worrying me statement:
To get started with the Android SDK Preview, you must agree to the
following terms and conditions. As described below, please note that
this is a preview version of the Android SDK, subject to change, that
you use at your own risk. The Android SDK Preview is not a stable
release, and may contain errors and defects that can result in serious
damage to your computer systems, devices and data.
The same for 32 API (Android 11). For Android 7 there was no such warning.
Is it safe now to install and use this emulators? What damage can happen to computer? How to prevent it? Does someone already install and use them?
In the similar question I found the following recommendations about potential overheating PC:
It could potentially damage your laptop if it overheats. But that is
why the fan is running. It is trying to cool down. If it gets too hot
your computer will start throttling programs, apps and processes to
try and cool down. And if it gets too hot it should shut itself down
to prevent damage. Make sure to keep and vents and fans clear, clean
and free for airflow.
This is the only main problem with this emulators?
Any emulator is doing something the pc isn't handled to do, this goes double for mobile apps. Worst case scenario I had with emulating a G phone was that when closing the app the pc would slowly start to crash which I would need to restart in order to get it working normally (also the lack of space on the ssd made a problem too) but no major damage was made. Of course don't neglect your pc, the more you complex stuff you try to emulate the more your pc will gasp for air, give it some breathing room now and then, take a break and keep going. If for example you are using flutter dart has a nice API that you can use online that won't effect your pc at all.
Also this goes triple for laptops since most don't have that good of a cooling.
I tried to install 33 API (Tiramisu) emulator on Notebook ThinkPad T420 (processor: i5-2520M CPU 2.50GHz, memory: 8 Gb, SSD) with enabled virtualization. Emulator boots about 8 minutes. Works terribly slow. Always reads or writes something to SSD (since memory is not enough it is using swap). Not possible to use. Temperature of CPU is near to critical level: ~90°C.
PC must have more resources otherwise there is real risk to damage it.

How to predict performance of a program for smartphones developed on a pc

I am developing a program that is going to be very performance-intense for Android/smartphones. Because I do this on a pc (Windows) I do not really know how my application will perform on a mobile device. I do not want to port this program to android until I have a good working version for Windows (this will be my first Android-app and I don't want to try to troubleshoot something when I'm not even sure whether my program is working).
I am searching for some database where I can compare pc-GPUs with mobile GPUs. I know that an accurate comparison is difficult between such different architectures, however, a small hint about the expected performance would be very helpful.
By the way, I am developing on a machine with an integrated Intel® HD Graphics 4400 and ideally, I want to compare it to something like an Adreno 306.
Rather than using benchmarks for the GPU, look at existing cross-platform applications with similar performance and see how it compares. Install it on your computer to make sure the intensiveness is similar (using whatever benchmarks you want), then install it on your android device to see if it can keep up to your expectations. You can find benchmarking apps or you can use the profilers on Android Studio to see how the device in question is handling the application.
This is about as good as you're going to get. Like you said, so much relies on the implementation and the vastly different architecture. Lastly, if you're building on a framework that builds to other platforms (libgdx, xamarin, etc), you should present a specific question to other users of that framework.

android minimum hardware specs for dev machine - can i code using a notebook?

So far I have been developing directly on my galaxy nexus and nexus 7 using the amazing AID app.
However, as the N7 can't provide logs due to it being jelly bean, i feel the need to get a mini notebook in order to utilise adb logcat.
My main worry is that something with only 1gb (2gb if i upgrade, which i will) and a 1.5-1.83GHz atom CPU won't be powerful enough.
I can possibly get around certain worries by not using emulators and testing directly on my two devices, so that will save me a great deal. Also I am tempted to just use vim and command line tools instead of eclipse which again might save me from a slow PC.
What do you guys think? Is the notebook way under powered? What if i just use vim and no emulators?
Side note, does anyone actually code in vim/command line?
something with only 1gb (2gb if i upgrade, which i will) and a 1.5-1.83GHz atom CPU
will work just fine, as long as you're not planning to run a tablet emulator. I sometimes have to work at my Asus EEEPC with the same exact CPU and I've got no problems so far
It is doable with 1gb RAM and using vim/commandline tools. However, eclipse provides a project wide perspective which is hard to duplicate in vim (vim power users may be as productive, if not more though). So in terms of memory 1, 2gb RAM will be fine. Testing on devices is always better than emulators.
One thing else though, a commandline build with multiple module dependency is non-trivial to setup and maintain. This is because Google has historically been modifying the build.xml file, breaking existing build scripts fairly regularly. So if you are well versed with build script internals and prepared to work on them you should be ok.
Debugging Android apps without Eclipse based breakpoint debugging support may be a significant issue too. Some bugs are caught in a lot lesser time with this. So plan accordingly if you don't want to use Eclipse.
Eclipse also provides very good JUnit/Robotium support for writing test cases, You won't get this with vim.
As I wrote down these points I think running Eclipse in 2gb notebook should be possible (just don't run other apps with doing development) and thus is recommended.
I have extensively used vim just not for Android development. You can also install vim plugin for eclipse if you prefer that.
Modern notebook hardware certainly is capable for software development; in fact, many (hobbyists as well as professionals) use a notebook as their main development platform.
However, with a mini / ultra-small form factor, you'll pay more for a less capable machine. Unless you need extreme mobility, I would suggest a standard notebook, with a little extra money spent on RAM (8+ GB) and an SSD. (Then, neither big IDEs nor emulation is out of scope.) If money is an issue, you can still get clunky-looking, but fairly powerful 15" or 17" laptops.
i think you Configuration is good enought to run Eclipse , Myself i had to Remove some Composant on my PC beacause we have 1 PC for Work/Internet/Eclipse and 1 PC for Gaming Etc ... , iam using Galaxy S2 and dont use Emulator many times , Yes i have some Slow Down some Time , but try Eclipse with the Minimal Configuration and No Emulators but Upgrade to 2 GB i have myself 2 GB Here and DUal Core E5200
Yeah that's under powered. For a windows PC I'd want 4gb of ram, not sure about Linux but atoms are dog slow either way.
I'm sure it'll work but it won't be fun, I'd be most worried about disk speed as that's what drives me nuts most.
I'd also take advantage of the ide and all its nice features too

Should I build my Android app for x86?

I am developing an Android game, which I will upload to the market. I am using the NDK; the majority of the game code is C++.
Should I worry about supporting x86 devices? Are there actually any out there?
Currently I am building for ARMv6 only; building for both ARMv6 and v7 increases the APK size without making it any faster (it's already fast enough). It would be nice if I only needed to build for a single architecture.
If you can do it without too much hassle, I would do it.
Not because there are tons of Android/x86 devices, but simply because supporting multiple architectures is a fantastic way to shake out bugs that you might otherwise never encounter (or that would lie dormant until something changes on the system two years from now, and suddenly your app doesn't work anymore). It will make you a better programmer.
Also, I'm surprised that building for armv7 doesn't confer any advantage. Do you mean that you're already framerate-capped running the armv6 build on an armv7 device? If so, building armv7 may still allow your code to run faster, which typically saves energy even if it doesn't increase "performance". Less energy = people use your app longer.
Now, all that said, I don't know the Android toolkit, so I don't know how much hassle is actually involved with supporting multiple arches. If it's a major hassle, then by all means stick to armv6; it's a good baseline for "most" devices out there.

Android executes codes faster than PC

The same code for Android (1Ghz Snapdragon) executes 2 time faster, than on my PC (in desktop application) with 3.3 Ghz Core 2 Duo (class from PC was copied to Android project). Tested with Win7 and Debian. Time mesured by System.currentTimeMillis() for only one (main) calculating method. Why it's happend and what can I do to fix it?
UPD1. First application running on real android device, second - in JRE
UPD2. In that part of applications, that I try to compare, used only simple math and operations with BigDecimal (multiply, sqrt, divide and so on). Idea - calculate pi by gauss-legendre algorithm
You're going to need to be more specific about what you're doing to monitor this. There are a large number of factors at play that could influence this. If you're running on the emulator, forget it -- it's incredibly slow, there's really no comparison there. However, I get the feeling you're talking about one application running in the JVM as a standard Java application and another application running on Dalvik, but there, you really can't compare either. Different frameworks have different libraries and different calls that are implemented in different ways. Not to mention Dalvik is optimized differently than the standard JVM and so on.
You'll need to give us more information in order for us to attempt to give you an explanation, but I suspect you're trying to compare two things that really can't be compared.
I think because the Android device has a different processor architecture than your PC, so the CPU on your PC needs to emulate the Android, so it would do much more processing.

Categories

Resources