My application is working properly in the emulator. In Case of Device it is not working properly. it means application is running but in middle of the application it is forcibly stoped. after that i am getting the NPE(Null Pointer Exception). Why it's came? is any differences exits between emulator and device when the running of application. please can anybody help me.
thanks
There are not many differences for nexus devices, but for 99% of Android phones out there, the manufacturers mess up a lot of stuff. Sorry.
Related
OK so I am trying out Genymotion for testing my app, so that I can reproduce the errors that my users are telling me they experience with my app, which leads me to fixing the issues. I guess that is the main reason for using Genymotion.
Real life example:
A guy says: "I'm using a Moto X (2013) on Android 5.1.1 and I can't do X with your app.
Me: Looks at Genymotions list of virtual devices and can't find neither the brand of phone nor the android system. I can only find android 5.1.0.
Does this mean that I Genymotion just doesn't have what I need, or is it because one of the other options are just as good? I really don't know. What am I missing?
Any help would be appreciated.
Brian
An emulator, be it the default android emulator or Genymotion or any other emulator will not be able to replicate a real physical device to the complete extent.
The devices available on Genymotion are just templates to recreate the device with values such as RAM, Screen size etc. You could try creating a custom device by using the values for Moto X.
One possible idea would be to get the stacktrace from your friend and see what's going on. The best way to do that would be to integrate crash reporting system like Crashyltics. You will automatically get crash reports in your fabric dashboard.
I am developing an application on android 3.1 Honeycomb. It force-closes on Asus epad.
I don't have an Asus Epad to check why it force-closes, so I want to try it on an Asus epad Emulator. I updated the ADK for eclipse but it doesn't provide an Asus epad Emulator or add-on for it.
In other words, my main problem is that I want to test my application on an Asus emulator.
Does anyone know how I can do this?
Update----
It's showing error on background process & it's a null pointer exception. But now I found another way to do this background code so it must work now.
Thanks for all your comment.
Still if any one find out plugin or package or a way to create emulator which work as Asus Epad.
Thank You.
I am pretty sure that it the app gets force closed on an actual Asus epad, it will get force closed on the emulator too.
You can try to debug your application using LogCat in Eclipse and look the stacktrace to figure out what is going wrong.
Could you post details about what exactly does it crash on? You could monitor the logs in DDMS and check the stacktrace to analyze what exactly is it crashing on.
Unless you post specific details about a problem, there's very little I or anyone else could help you out with.
I have created an application its working fine on HTC Wildfire but one of my application user having HTC Thunderbolt has reported that it is generating Application Force Close dialog.
As i don't have real device and i want to sort out the issue, i want to know is there any emulator available for HTC Thunderbolt so that i can test my application on it?
Hardware related bugs can't be tested with the emulator. So the answer is no, there is no such thing.
If the two phones have different Android versions and that is the source of the error then you can find the error with an emulator
An emulator won't help much to fix a problem with a specific device.
First of all you should acquire a stacktrace from the user using the Android Market or an EMail intent.
After that you can try to reproduce the problem using a service like http://www.deviceanywhere.com/ for example.
Emulator --- Device
Hey people. I'm not very experienced in Android development, so I would like to know what I have to expect.
I wrote an app of about 1000 lines of code, which is running perfectly fine in the emulator. So what will it be like when I install it on a physical device? Ain't got one here at the moment, but I will get my hands on one on the next days. Will there be a bunch of nasty errors? Just some design stuff? Errors, that cant be reproduced in the emulator?
Thanks in advance
EnflamedSoul
Note: emulator runs the real Android code. It emulates ARM device and runs the whole stack on top: linux kernel, libs, android code. It is the same as device sans some hardware (camera, mobile network stuff, gps) and much slower.
So what will it be like when I install it on a physical device?
Will there be a bunch of nasty errors?
No problems really. It should work ok.
Just some design stuff?
If you set your emulator to the same resolution and pixel density of your device, then it should look identical.
Errors, that cant be reproduced in the emulator?
There ares some thing that you can not do in emulator: primarily make calls and use camera. Otherwise emulator behaves like a plain phone.
My Android apps have all been very simple, but I have really only had to make small changes to their layouts when I tried them on my phone. Over-all, the process of moving to the phone was a rather painless one.
I had a code that took 4 minutes on the emulator to complete, and on the real device it is just 10 seconds.
I have an app that uses quite a few graphics in it.
When I open and close my app repeatedly on my emulator (1.5 - 2.2) it runs fine and by checking the heap I can see everything is being cleaned and gc'd properly.
However, when I run my app on an HTC Aria phone (2.1) the app crashes every time I try to re-open it. When I look at the heap I can see that objects are NOT being cleaned up like they are in the emulator.
Does anyone know why this behavior could be happening? I did try it on another HTC Aria (a friends) and it crashed the same way as on my phone so I think it's not just isolated to my particular phone.
Any thoughts or ideas would be really appreciated on why things are cleaning up properly on the emulator, but not on my phone. One thing to note, is that I DID have it working and gc'ing fine on my phone a few days ago and I didn't change much and now it's not working on my phone so it's a bit of a mystery to me.
Thanks!
Note:
The crash is caused by an OutOfMemory Exception. I'm pre-loading a handful of graphics, and there's not enough memory for two instances of the application to be running at the same time so it's crashing because the 1st instance of the application was not cleaned up properly.
You have several emulators, all running just this app, closing it and start it again.
Your Android device has several processes running the same time, like background sync, Facebook notification, Twitter notification, Calendar sync, Contacts sync and the like.
One way to look at this is to try to mimic your Android device state on your different emulators, and see if you can get the same error on the emulators. Use some apps that sync in the background and others who use a lot of memory. Then you have a testing environment that mimics the real world, and you can change your app up to a state where it doesn't crash. Maybe downsize the images as much as you can to ease memory usage.
Remember, you can never force the Garbace Collector to start. You can only tell the system that it is possible to collect this garbage.