Android “optimizing” my app (libgdx game, actually) on every reboot, still app runs very slow when launched - android

I know it means it performing AOT compilation.
The thing is that I get a lot of reviews saying "everything was fine before the latest update, but the game is extremely slow now" from users on Android 6.0 and above. Some users report that sometimes the game can not respond to their actions for literally minutes.
Also, a few reviews said that the game is a cause their phones reboot takes a very long time saying it's "optimizing apps 1/1" and that the issue goes away when they uninstall my game from the device.
I cannot reproduce the issues on any devices I have on hand (I have no Android 6.0 unfortunately, only 5.1 phone and 7.1 tablet - the game runs smoothly on those)
I need help to figure out the cause of the problem.
What I did before the latest update (that caused the problem):
switched from AS 3.0 to 3.1 (and updated project to use a newer version of gradle - 4.4)
updated android support libraries to 26.0.1
updated Appodeal libraries to 2.1.11
updated libgdx version from 1.9.5 to 1.9.6
Also, I made a few minor changes in the game's core code, but I see no way of them causing system-wide issues, it has to be something of the above. Are there any knows issues with these versions of libraries?


Upgrading Android Appium Tests

I have appium tests set up for a React Native project with an Android build. They work well with older emulators, and my older handset (and the iOS build) but don't seem to work properly with 7+ Android.
They take roughly a minute running on my Android phone (5.1.1), or my 6.0 emulator. When I tried to run them against newer emulators (7.1.1) I got a weird bug (the tests hang, unless I manually interact with the emulator, which makes them continue(!)). I then deleted the Appium Settings and Unlock apps in case they're incompatible, and also added "automationName": "uiautomator2" to my desired capabilities. Under those circumstances, they work but take ~20x longer (around 20 minutes). I can't see any errors, warnings, or other explanation for the delay in the appium server log, or logcat.
Standard android emulator, Android 7.1.1
Appium 1.6.5 (I also tried 1.6.4, and 1.6.5-beta, and 1.6.6-beta.2 with pretty much the same results)
React Native 0.42
Does anyone have any suggestions for what might be wrong with my setup? Any help appreciated!

How to ensure an app will run in most versions of Android?

I've developed my first app and it worked fine on my phone (Android 2.2). When I tested in a Xoom (Android 3.2), it had lots of bugs, though. I need this app to run in many different versions of Android. How can I develop it and make sure it will, having only an Android 2.2 in hands for tests?
Developing with the last version targeted in the manifest while keeping a close eye to back compatibility is how you achieve this with the best efficiency.
Many libraries (ActionBar Sherlock, NotificationCompat2, ....) will help you in making your app back compatible without issues.
I strongly recommend making the app for the last version of Android so it is ready when this version gets some steam instead of targeting whatever version is the most popular right now. It is a bit more work at the beginning, but it will save you many headaches later on.
The emulator will help you test this, the best configuration is to have a terminal with the last version of android at your disposal (this is why the nexus are a very good choice for a dev) and different configurations on the emulator to test back compatibility or other form factors.

Hackers: What is your Android Workflow? [closed]

I am new to Android Development and I would really appreciate some advise on how to develop android. I am currently using Eclipse with Android SDK installed on my Macbookpro.
I am using the newest API, 3.1. However I noticed that the android emulator is not very stable (it keeps crashing sometimes) and the emulator is insanely laggy (my Macbookpro has icore5 and 4Gb ram with AVD ram set to 1Gb plus I am using snapshot). I gave 3.0 a shot but it's still very slow especially with respect to start up time.
How many of you still develop in 2.3.3? Is that the most stable version right now? Are most devices still using 2.3.3?
How many of you actually develop on an actual device? Do most of you just suck it up to the emulator?
In addition, as an avid Vim user, I find eclipse to be really heavy for development. I am much more accustomed to developing on the command line. I also use Git pretty heavily. I am currently using eclim but it's another dimension in it's functionalities. How many of you stray away from the eclipse IDE framework?
EDIT: Ok I didn't know 3.0 was for tablets. I was just reading the intro parts on, which I am not particularly fond of. What is the best book then for doing android development?
You ask too many questions at the same time, but here is something that might interest you about share of different sdk version in the android market (for apps in the category Entertainment) :
Android 2.2 58,4%
Android 2.1 20,8%
Android 2.3.3 9,3%
Android 1.6 4,9%
Android 1.5 4,6%
Android 2.3 0,5%
Android 2.0.1 0,1%
Android 1.1 0,1%
Android 1.0 0,1%
Android 2.0 0,0%
My stats may not seem so relevant but almost no one till now uses android 3.0 and above. It'snice to be compatible with it but your target and min sdk (in your manifest) should be lower if you want more than a few thousands users.
Personnally, I use a 2.2.1 device from archos and I would not upgrade it above just to be able to test what most android users have on their device.
I used to be an emacs fanatics for years and switched to Eclipse 2 years ago for giving Java courses. And really, after 2 years I would never come back to emacs although I loved it but Eclipse, once you get used to the fact the it is missing 6 letters keyboard shortcuts, is really very very very productive.
Close your unneeded projects, use working sets, and tune eclipse memory settings, it will help.
Learning Git though.
Oh, and by the way, if you want the fastest solution to test your programs, you should consider testing on a real device. It's far more efficient than the emulator. Personnaly, I like to use dropbox to copy files from eclipse to my android. Then I can install it within one click from dropbox, using settings >> Application to remove old apps when needed.
The only problem I have is that my app is not generating enough revenue to allow me to follow android 's new SDK, buy hardware to test it with honeycomb, unfortunately.
Using 2.3.3 is not about stability.
2.3.3 is the phone version of Android while 3.1 is the tablet version. Hopefully they will be merged in 4.0. Anyways i used to develop using 1.6 as long as i don't need the new features to reach as many devices as possible... its probably time for 2.1:
From my experience you should use Android 2.2. I have run into very few bugs with the emulator and graphical layout of the xml files. Also if you walk into any AT&T store most of the phones right now will ship with Android 2.2. Android 3.0 is for tablets only. Your 2.2 application will still work on tablets.

Android Things - Slow Installation on NXP PICO-PI-iMX6UL

We are experiencing extremely long installation/start/run times for Android Things applications on the NXP PICO-PI-IMX6UL. This issue is observable when using both Android Studio and adb directly on the command line.
A small application of ~2MB in size takes anywhere from 5 to 15 minutes to install. The same application on the Intel Edison only takes only a few seconds to install.
It's worth noting that other adb operations seem to run very slowly as well (i.e. shell, logcat, etc.).
We have closely followed the procedures outlined using these resources to install the Android Things image:
We have re-flashed the Android Things image several times and experience the same issues.
To rule out any application issues, we have tried installing/running the Android Things sample template application found here: and experience the same issues. We can verify that this application installs/runs without issue on an Intel Edison board running Android Things 4.1.
Here are a few more details about our setup:
Mac OS 10.12.6
Android Studio version 2.3.3
Android Debug Bridge version 1.0.39
Android Things Developer Preview Image 5.1
Any suggestions on what is wrong with our setup or what might be causing these issues?
Update 10/20/2017
Further testing with additional NXP i.MX6UL boards has only shown minor improvements in installation and runtimes, and the results are not consistent. We also tried swapping out the daughterboard for an older version (Wandboard i.MX6UL), but the results were the same.
We plan to continue testing as newer versions of Android Things are released, but in the meantime we are going to continue development with the Intel Edison, despite it being discontinued.
I assume there is something wrong with the chip configuration, since simply keeping the kernel "alive" keeps the system rather busy with only 50% idle.. Running the gradle task "uninstallAll" solved the problem if I was not able to start further debug sessions.
Show current CPU usage:
adb shell

How does bugfixing work in Android versions?

I'm developing a feature in one of my Android apps, and I want to use a particular WebView API. I have found a bug within this API, which started to exist in version A and was fixed in version B of Android.
What does this mean to me?
Does it mean that people with devices running Android version between A and B will have this bug until their manufacturer decides to provide an update?
Or does it mean that if I build my app using SDK version later than B, it will behave as expected on devices with Android between A and B.
I wasn't able to find an answer to this question online, and based on the [lack of] updates to most of the devices, I think I should not use a function which was bugged on still widely used versions of Android.
An example of what I mean
Bug in WebView discovered in 5.0.1
Bug fixed in 6.0.0
I build using 7.0.0
Does it mean that my app will be affected by the bug?
In case of bugs in Android system, using new system version for build will not fix the issue on the device.
However, in my case - bug in WebView - since Android L, WebView was delivered as a separate package and can be updated without updating Android on the device. Thanks to this, we don't need to wait for manufacturers to release anything, it's up to the user to update their software.