Why did the Android app START VERY SLOW on REAL devices, but ok for the emulator?

First of all, the main content of the application runs very quickly on both. The problem is that, as the name says, it starts very slowly in the real device in which I tested it, but it runs quickly on the emulator. It will take about 2-4 seconds of delay before activity shows that there is too much.

I looked through my code and I do not see any problems. I even redid the onCreate, onResume, etc. methods, but to no avail.

Here are a few details:

  • Min SDK: 16
  • Emulators SDK: 17, 18, 21 (I tested the application on these three).
  • Real device: Xperia Z - Lollipop

... and application details:

  • uses many external libraries (mainly from github)
  • uses RTL (Arabic), but does not appear at startup
  • I suspect this is due to this: ( Android application running on an emulator, but not on a real device )
  • additional problem: the state of the application is not saved after I exit the application and then back (but I saw that this is normal and not an error).

I will not share this code, because the application is too large and complicated, and, in addition, I do not think that this code is a problem, since it is very fast after launch.

Here are the libraries I used:

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:support-v13:23.1.1'
compile 'com.android.support:gridlayout-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'

compile 'com.flipboard:bottomsheet-core:1.5.0'
compile 'com.flipboard:bottomsheet-commons:1.5.0'
compile 'com.guerwan:transitionbackport:1.1'
compile 'com.github.bluejamesbond:textjustify-android:2.1.1'

compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0@aar'
compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0@aar'
compile 'com.nineoldandroids:library:2.4.0'

compile 'com.ogaclejapan.smarttablayout:library:1.6.0@aar'

compile 'com.github.traex.rippleeffect:library:1.3'

compile 'asia.ivity.android:drag-sort-listview:1.0'

compile 'org.adw.library:discrete-seekbar:1.0.0'

compile 'org.adw.library:discrete-seekbar:1.0.0'
+4
source share

Source: https://habr.com/ru/post/1625619/


All Articles