3

I'm using genymotion android emulator to test my application(which needs google play services). As genymotion can't support this, I followed the instruction here. How to install Google Play Services in a Genymotion VM (with no drag and drop support)?

Whenever I tried to start this app on genymotion, dialog box appears saying "app isn't responding. Do u want to close it?".I've been using genymotion with Galaxy Nexus-4.2.2 since my first development of this app.It was perfectly fine.I don't know why it stops working all of the sudden. This problem only happen when I test my app on genymotion, not with real device and eclipse emulator. No error in logcat.Emulator can connect to internet. All checked . My code has no problem .I deleted genymotion AVD ,created and test with new one also can't solve the problem.
Please tell me how to solve this problem?

Community
  • 1
  • 1
EasterKim
  • 125
  • 4
  • 11

2 Answers2

2

This message appears when you are doing a long task on the main thread. It is called ANR (Application Not Responding). You should look at what's happening by using debug and profiling tools.

Add a break point into your code and Bedug (instead of Run) your app on the device. You can also profile the execution of your app through DDMS, to identify the part of the code that runs on the UI thread and take more than 5 second to process. You can find here more about Tracedump, the method profiling tool on Android.

Also, it could not come from your app but being caused by a third party element you call. I know for example the new "Photos" app from the Google apps can cause ANRs when you select a picture from the cloud that have not been downloaded yet.

If it is coming from a third part app, I don't know how you can solve this problem.

eyal-lezmy
  • 7,090
  • 3
  • 41
  • 35
  • Like you said, the problem is not from my app and not ANR because when I try test it on the real device and eclipse emulator , the app works fine. So the problem must be from genymotion – EasterKim Feb 08 '14 at 05:47
  • OK. So I think we don't have enough information to help you to solve your problem. You should edit your post by adding precisely how the things are doing, what you see on screen, eventually on the logcat, etc. We don't know when your problem is arriving (at the application start or when you do a specific action) and we don't have any explicit error, log or indication about where the problem is coming from. And not either about how Google Apps could be implied in your problem. So please add more info and we will be able to give you a more relevant support. – eyal-lezmy Feb 08 '14 at 08:24
  • 2
    Bedug sounds way more awesome than debug. – Fadils Jun 24 '15 at 02:07
0

Genymotion emulator does not come with integrated googleplay services so i suggest you check if the service exist in the device before trying to access it, that it wont freeze when you try to access the service.. Also you could debug directly in your phone, using the adb or using the adb own emulator (I know the emulator on the adb is slow xD but still..)

nunoh123
  • 1,087
  • 1
  • 10
  • 17
  • I've been using genymotion with Galaxy Nexus-4.2.2 emulator since my first development of this app.It was perfectly fine.I don't know why it stops working all of the sudden. For me to use adb own emulator is not possible as I can't see google map on this. Thanks for the answer :) – EasterKim Feb 07 '14 at 15:09
  • I understand the problem with adb emulator, i use genymoton too.. Maybe you changed someting in your code and that made the connection with the internet stop working.. Btw if the answer was usefull enough please mark it as answer with the checkmark on the left, Thanks! – nunoh123 Feb 07 '14 at 19:47
  • I would ike to.But I'm still waiting for good answer that can solve my genymotion problem – EasterKim Feb 08 '14 at 05:41
  • Look you already confirmed the emulator is getting access to the internet by go to a browser on the emulator, so we know that emulator has internet so if your app cannot access the internet in some way the problem must be in your code.. If you dont show your code or at least part of it neither i nor anyone else will be able to help.. You are not providing enough info for us to help – nunoh123 Feb 09 '14 at 00:37