2

I have not called any Url request the app shows a simple splash screen. I have disabled the instant run too but that warning still occurs.

06-26 09:26:05.022 8709-8709/saurav.com.navigation_drawer I/art: Late-enabling -Xcheck:jni

06-26 09:26:05.144 8709-8709/saurav.com.navigation_drawer W/System: ClassLoader referenced unknown path: /data/app/saurav.com.navigation_drawer-1/lib/arm

06-26 09:26:15.383 8709-8709/saurav.com.navigation_drawer W/System: ClassLoader referenced unknown path: /data/app/saurav.com.navigation_drawer-1/lib/arm

saurav sarkar
  • 187
  • 1
  • 8

2 Answers2

3

When your app starts, it first uses the theme of the launching activity to display the window background. Full explanation of the process can be found in Android Deevelopers Blog. If you don't specify windowBackground in your styles.xml, the default white will be used, and damage the UX. You can specify a more pleasing drawable there.

An alternative is to create an illusion that your app starts instantly, and put the blame on launcher. All you need is choose transparent windowBackground for the launching activity:

<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
    <item name="android:windowBackground">@dnull</item>
</style>

The visual result will be that after the end user have pressed your app's icon, the same launcher screen is displayed for few seconds, and then your activity comes in at full speed.

At any rate, you should analyze the startup process of your app and make it as fast as possible, pushing to a background thread (or threads) everything that can be pushed there.

Displaying a splash screen (i.e. and activity that loads very quickly and keeps the eyes attracted to it while the application logic is starting in the background) is the common cure for slow start on all platforms, not only Android. The official design guidelines discourage this, but many popular apps, including ones from Google herself, do use splash screens.

See https://www.bignerdranch.com/blog/splash-screens-the-right-way/ for a more detailed example.

PS It's true that such warnings for ClassLoader are usually irrelevant.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
0

This is caused simply by the android system taking a few seconds to start up your app - and the white is actually the window background specified in your theme. (so you could in fact use an image or solid color while the system is loading your app). There is hence nothing you can about it, since it is the system loading your app which you have no control of.

It will be worse when deploying from Android Studio because of the overhead by features like instant run and debugging which will always make your app run slower than it would if it was a release optimized build.

Also, I wouldn't worry about those particular errors unless they are crashing your app.

Warrick
  • 1,623
  • 1
  • 17
  • 20