I am building an app and have hit a bit of a bug when running my app. In order to troubleshoot this I tried debugging, rather than running. However, whenever I do this, the screen of the emulator shows all black apar from the app name bit at the top.
Anybody know why this might be?
For some reason, I can now see the layout, so thanks for your help. However, the "variables" eclipse window shows blank, and this is the bit I really want to see. But thanks for your help.
post your main activity code / androidmanifest xml code,
Restart your eclipse... it would Definitely show something in your logcat window since your application has started on emulator...
Related
I have tested my application using ionic-serve and everything run normally.
But, when i tried it using device, the application will first run the splash screen (which is not run when using ionic serve) and nothing happen, only white screen.
Can somebody please help me with this situation?
I have no idea about what happen.
The white screen issue often occurs on devices and not in the browser when you are injecting something into a module that kicks off your app. Try to figure out which one, and remove it (if it's not being used) or update it.
First thing to do is to check for errors in the log. To see them, type the address chrome://inspect/#devices in chrome, and click on your app. You'll need to make sure your device has usb debugging turned on.
I'm noticing a strange behaviour when i plug in any android device to my computer.
It starts showing some messages in the LogCat in Eclipse as soon as i plug it in. Same thing with my HTC and ASUS tablet.
This has never happened before and I dont remember doing anything out of ordinary when I developed my app yesterday.
Any1 has an idea how to stop this ?
Thanks in advance
You can add filters to the logcat so that you only show relevant information.
From my experience it's perfectly normal for the logcat to start displaying messages as soon as you plug in a device. At the least it means it's working! ;)
However, once you start building and running your application and picking up errors the specific filter for your application will start displaying which will only show logs pertaining to your app.
It's set by default to switch to your app once an error displays, but you can change that default by going to Preferences > Android > LogCat and changing "Show logcat view..." from "Error" to "Verbose" or whatever works. That way it will switch to showing your application's logs faster. Beyond that, you can do further specific filters.
Hope that helps XD
This can't be stopped as such as the log cat in eclipse will retrieve anything where logging is being done of some sort whether it is an app, or android itself.
You can filter it, I think at the top of the log cat window there is a text field to only show log messages that contain a certain string and If I remember correctly there are also buttons to the right to only show error messages or warning or both etc.
I had the same problem with my Nexus 5. Eclipse wouldn't recognize the device, so I messed around with the device window a bit and then the log cat started to go crazy.
After several reboots, I un-checked the USB debugging option in the phone's Developer settings and re-checked it.
Problem solved.
I think something in the Device window changed when I performed this action, but I'm not certain.
The log tab is visible in DDMS and I have been logging data using Log.v(...) for many a week now without any problems.
Today, the log data is now longer being displayed in the Log window. Worked, then did a programming change to track a bug and now the log data is no longer showing.
Have tried running the app on an external Android phone, on the Android Simulator and it makes no difference.
Have closed down Eclipse, reloaded and still no change.
The console displays activity but only to the point of starting the activity.
The external phone is set up for debugging - not that this could be a problem since I have the same problem with the simulator
It looks like I have inadvertantly set something incorrectly but can't remember changing anything :-(
Anyone come across this problem before - have looked at previous posts but none seem relevant.
Regards,
Oliver
I had the same problem a while back. I was using the emulator and device for debugging. Apparently you have to select the device listed in the DDMS view whose logs you want to see. My logs were blank because the device that I was expecting logs from was not the one selected.
Hope that helps
Tried this:
https://stackoverflow.com/a/9826502/1238317
Check in your logcat window - TOP RIGHT corner PAUSE button || (Pause
receiving new logcat messages)
Few clicks + eventually restart eclipse (usually works in my case)
Check your LogCat window to see if you are filtering and make sure to set the debug level to Verbose.
There are possible reasons and solutions:
LogCat might have to much in cache, clear the log and see if it fixed the issue
You might need to select the device in the device view (even if it is already selected, try to click on it)
adb is not correctly working anymore, try to kill and start it again
Check if you see output if you use the command line adb logcat
Just go to DDMS perspective and click on the device's name in upper left corner and done your log cat will Start with a BOOm :P
In Android Studio, which I have found to be much more reliable and intuitive than Eclipse, I found this to be a common issue. For me what solves it (device is automatically set when running your app) besides checking code, is to Quit and restart the emulator or Quit Android Studio and Emulator and reopen/restart
I am using the hello android tutorial and creating an avd through eclipse. When starting the emulator no image is used. It simply displays a black back screen with the word ANDROID in the center and a blinking cursor at the end of the word ANDROID. I have followed the steps to the T for installing the SDK, Eclipse, and the ADT. Even starting the emulator as a standalone produces the same result. Is there a step I am missing to get the emulator to load an android environment to test in?
How long are you leaving it before you close the emulator? In my personal experience I have found the emulator to take quite a long time (Even up to a minute, sometimes longer) to fully boot up to the home screen.
I'd advise waiting a little bit longer just to make sure you're not closing it before it loads.
Edit:
Also have you tried looking at the log to the bottom of Eclipse? If for some reason there is a problem in fully loading the emulator there may be some sort of error message posted there to keep you informed.
I created Hello,Android application with TextView, not xml.
When I run it I don't see "Hello,Android", only wallpaper.
Any ideas, what is wrong?
It takes up to 2 minutes to have the run app rendered. Don't worry, just be patient.
You can leave the emulator running and run the app over and over again so it will not take that long after the first time.
I also found that starting the emulator from the command line is a lot faster, and you can just leave it running, and run the app from Eclipse; this way starting the app will not take long at all since your emulator has been running already.
I hope above is helpful...
I guess you are using Eclipse so the first question is Do you have an android phone connected to the computer? If so the "Hello, Android"-program will hopefully be running on that.
I had the same problem, and I gues I know why I couldnt see "Hello, Android".
You just have to click on
"Home" Icon in the emulator
Select applications icon at the bottom of emulator desktop.
Lauch the helloAndroid application to see the message.
Hope this helps.
Lasantha