Kishore Challa
Kishore Challa

Reputation: 21

Android app shows white screen except for new install

I am working on an Android app with Android Studio using Kotlin. The app was working fine until yesterday when it started showing white screen when I relaunch the app.

If I delete the app from the emulator and run the app, it installs and works perfectly fine. But if I stop the app and relaunch either from Android Studio or from within the emulator, all I see is a white screen.

I am using Pixel 3a XL API 28 virtual device. I allocated 512 MB VM Heap, and 1 GB Internal Storage. The app itself occupies only 35 MB.

I setup Log statements in MainActivity onCreate, onStart, onResume methods. None of them execute during the relaunches. They run only on the new install.

Has anyone seen this problem? Any suggestions would be great.

Upvotes: 2

Views: 1017

Answers (3)

Vibhanshu Sharma
Vibhanshu Sharma

Reputation: 259

I think there is problem with the emulator, try running the app on a physical android device.

If the contents in your app requires internet then also check whether you internet is on or not, sometimes white screen can occur due to no internet also if your app requires active internet connection.

Upvotes: 0

Raju Tukadiya
Raju Tukadiya

Reputation: 229

Instant Run in Android Studiosometimes issue when running app while white screen appears to try to disable Instant Run in Android Studio.

Upvotes: 0

Anas Mehar
Anas Mehar

Reputation: 2835

please add this line into your app theme

<item name="android:windowDisablePreview">true</item>

Upvotes: 1

Related Questions