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.
please add this line into your app theme
<item name="android:windowDisablePreview">true</item>
Instant Run in Android Studiosometimes issue when running app while white screen appears to try to disable Instant Run in Android Studio.
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.
Related
I've just begun Android development and set up my Android Studio and Emulator up with minimum version of the project API as KitKat and maximum version as Oreo (8.0). I created an empty activity to start of with and wanted to test it out but when I run it I only get the following screen (it is literally transparent):
I've already changed my emulated performance graphics to Hardware - GLES 2.0. I've also tried cold booting and cancelling the saved state but to no avail. Here are the other AVD settings:
I would appreciate any help as I am very eager to get started. Thank you!
Okay try to create a new virtual device.
And if then also it doesn't work then you can also run your application on your real device
I have downloaded android studio and now i am trying to run an app.I haven't changed anything in code or design.I am using version 2.2.2
When i click on run it gives me an error
init: Could not find wglGetExtensionsStringARB!
But emulator opens.Then there is blank black screen for 2-3 minutes,then androidtitle for another 5 minutes.This is what i get.
But i don't know where is my app?
What you're running is Android version 7.1 (Nougat MR1). You can see the list of apps (app drawer) by clicking on the small ^ (caret) icon above the opaque area highlited as a red circle in the picture below
emulator opens.Then there is blank black screen for 2-3 minutes,then androidtitle for another 5 minutes.
This is normal. You should wait until the emulator fully boots and run your app again. If your development computer has an Intel processor, be sure to install HAXM. It will greatly increase the speed of the emulator.
I made an android project in android studio & test it in real device it works fine but now i have not real device with me & want to run the project in Emulator. I install the AVD & intelhaxm-android.exe from the directory
C:\Users\INZI\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager
after that I created Virtual Device to test the app but when I run this it shows black screen with android printed in the centre of the device but does not show the home screen. I tried it with the
Visualization technology Enabled in BIOS setting. what should I do now I waited about more than a half of the hour but its same.
Please help
Thank you in advance
I resolved the mentioned problem Emulator was not showing the home screen because
I have more size of virtual Device than Haxm
I haven't completely downloaded the API with which I was testing.
Now I set less size of Virtual Device & test the app with the lower API that I fully downloaded .... now its working fine.
If I were you, I would try Genymotion which is a much smoother emulator than the default. Furthermore, you will not run into any problems while setting it up as the program handles everything for you. Of course, as you become more experienced, you will want to debug your apps on a real device but as you do not have access to one, Genymotion is your best option.
I have a problem running my app on a device.
Not on all devices!
On many devices(Lenovo android 4.2.2, Lenovo 4.4, Nexus 4 android 4.4 and more) it's running perfectly!
Unfortunately on some devices, such Samsung with android 4.4(upgrade to 5.0), Wiko android 4.4.4 app crashes without any message.
When I click on the app icon, the app opens then it shows a white screen for less than 1 second before the app closes.
I've made a apk file like this: In Android Studio I press "run" triangle, after it finished building I copy apk from "appname\app\build\outputs\apk". app-debug.apk
Does anyone have the same problem ?
Thanks for any helpful information !
Important:
The device is for 2,500 kilometers from me
UPD:
I try to launch "empty" app and it works!
I am trying to test my app on android emulator. So as soon as, i am choosing run the application, a new window pops up on the screen and after taking 1-2 minutes, it goes not responding.
I also tried running the emulator separately using AVD manager. Using this, i am able to start the emulator; but after 3-4 minutes - it goes "not responding".
OS- Windows 7 32 bit [ intel pentium 3.00 GHZ + 2GB RAM]
Java - 1.6
Android SDK - i have the latest SDK with 3.0 OS
IDE - eclipse Helios Service Release 2.
Plz help, i am unable to do anything.
Update: can you guys point me towards other 3rd party emulators which i can use?
Update2: My emulator is taking too much time in launching now. Can this be a cause? If yes, then how do i decrease the boot time?
(This isn't so much of an answer, but might go some way to figuring out the source of the problem; I'd comment on the original question instead but don't have enough rep to do so)
I keep having this problem too. I have an app with a few activities, one of which contains a layout with a Canvas which runs its own thread to do drawing processing. All of the activities run fine except for this Canvas activity which seems to crash the emulator in the way the OP described (the emulator .exe itself crashes rather than the application within the emulator) if left to run for a few minutes. As far as I can tell I'm not doing anything unusual with the thread - I copied the Lunar Landar example in the SDK and worked from that so I'm doing everything "by the book". The app runs fine on real devices.
So, while I realise the OP may be long gone, could anyone else with a similar problem confirm that the affected Activity is using a Canvas, drawing Thread, or anything like that? This problem is a real pain and I can't find any other discussions/solutions for the matter.
EDIT: I recently did a complete, clean re-install of the most recent versions of Eclipse and the Android SDK with all the updates and that seemed to solve the problem. Guess there was a bug in an older version of the emulator that was fixed in a more recent release.
Have you enabled snapshots. If you enabled it then you can be trying to open a incorrectly saved snapshot. If so, while starting the emulator with launch options, uncheck launch from startup
#mudit:remember Android 3.0(Honeycomb) is dedicated entirely to only tablets and not the mobile phones..
Does the emulator prompts you "not responding" in your app or when you just start the emulator without launching an app, too?
A strong advice: you don't need to restart the emulator for every app launch, just keep him running (maybe you already do that).
Does the logcat show some errors prior to the "not responding"? Have you tried creating another AVD?