I'm working on an app and I've been able to successfully debug it using the device. I have a crudely working version of the app and I wanted to test it out on the phone, show it to friends and get opinions. The problem is, after doing adb install I now have the icon on my phone but when I try to launch it, it gives me the "Waiting For Debugger the process is waiting for the debugger to attach" message. I have removed the 'debug=true' flag in the application manifest and also turned off usb debugging on the phone. Why is the application thinking I'm still debugging it? What do I need to do to be able to run it without having debugger on eclipse attached?
First, Set debug="false" in manifest.xml, and uninstall application from your device and reinstall it. It will work
just restart the device, not power off, choose restart
If all the above doesn't work, start the application in debug mode.
1) In eclipse -> go to the debug perspective
2) When the app is running -> press the "Disconnect" button (next to the "stop")
3) Turn off your phone.
4) Remove the battery for 30 sec
All should be back normal
Related
Well a windows 10 update broke sleep, the computer went to sleep with the emulator open and now that's broken. When I run an app to launch in the emulator it will boot the emulator but won't install just time out. When I try and run an app into a running emulator instance Studio says:
com.android.ddmlib.AdbCommandRejectedException: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
Error while Installing APK
I've followed some of the other threads here. I've tried changing
the environmental variable in control panel, but in fact I think it
pointed to the right place originally, where the sdks are these
days.
I've tried restarting the PC. I did try deleting a couple of
adb files, that didn't work.
I've tried deleting all the sdks and
downloading them again.
I've tried uninstalling and updating Android
Studio, several times. Now on AS 3.1, still not working.
Bit of a nightmare really.
How do I set the vendor keys? Using AS console commands? Can anyone point me to a dummies guide, this is a bit of a tangent for me, wish I could fix it from the GUI.
The working fix for this particular issue is to enable Developer options on your emulator and enable "USB Debugging".
OK so eventually downloading a nexus 4 x86 image android 27, with no play store worked. Sorry if this is repetition. Long live working emulators
Combining answers from here and there gives an answer that also worked for me in IntelliJ IDEA. I assume the issue is the same, since the emulator and AVD is the same.
Option 1:
Restart the emulator from AVD
Option 2:
Wipe the emulator data
Option 3: Stop the emulator. Then make sure it is up to date and try again.
If it still does not work, restart the adb server and retry.
adb kill-server && adb start-server
If it still does not work, perhaps your adb is out of date... somehow. This was the case for me. Running the following fixed that for me.
adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
emulator-5554 device
If it is now working for some emulators but not newly created ones, take note of the message in the emulator selection box: "Press Ok in the Allow USB Debugging Dialog"
Sadly, there is no such dialog. So go and enable Developer Mode in the settings of your emulated OS by tapping the Build Number several times. Then go to the Developer Settings and enable USB debugging.
After recent upgrades of emulator, the virtual device*) stays unauthorized. When I cold boot the emulator, sometimes I see the expected confirmation dialog, but this dialog goes away immediately, leaving no chance to click 'OK'.
We're aware of this problem and plan to fix it soon.
* Here, I was running x86 with API 28 and Google Play on Windows 10. I don't know which other scenarios are effected.
For anyone who might encounter this in the future -- I mean the ultimate issue of receiving the error, "This adb server's $ADB_VENDOR_KEYS is not set" despite not having any (or any sufficient) opportunity to click OK...
Resolution: In the Developer Settings, select the option to, "Remove existing authorized adb keys on device." Repeat the previous action -- the prompt will once again appear, as if the very first time.
-Mike
Go to developer options in your device and click on 'Revoke USB debugging authorizations'. Disconnect and reconnect your device. You'll get a prompt on your device to authorize your computer to connect to your device. click on 'OK' and your set.
Basically, the authorization key has gone out of date or it's no longer present. So, we just have to set a new autorization key and revoke the old ones.
I want to run my app in two different emulators. When I run the app for the first time I can choose the device, but when I try to run the app in the second emulator, it doesn't show up the window to select the device, so simply it runs in the first emulator again.
My solution for now is: run the app in one emulator then close it, run the app in the second emulator, and then open the first emulator :|
How could I configure this to have it as before the upgrading?
from edit config disable use the same device
and when you run and 2 emulator is running you click shift and select all of them
after you run again make sure to click stop to go out of instant run.
then don't check using same selection for future launches
and select by shift button your two emulators as the following image.
In the Samsung Smart TV menu there is an option to "Start receiving Smart TV logs". It's "OFF" by default.
When I clicked it I received a prompt to "Check the Console View". I opened the console view and ran the app on emulator, but i couldn't see any logs there.
I know that when the emulator is launched, a separate window showing all the alert(".."); logs is also launched.
I want to know how to use of this option of viewing logs via Console View. I'm new to Eclipse and Smart TV SDK. Is there anything that I'm missing?
How is this different from the logs that are already being shown with the emulator
The console log is used for debugging in real devices.
Emulator already have it's own debugger console window so the emulator not sending anything to eclipse.
If you want to work with real devices this feature is very useful. Do app sync from TV to your workstation and enable the log receiver. When your synced apps run in the real devices (TV/BDP) the alert from application will sent to eclipse's console window
The app will send its logs back to an active eclipse console on the system from which it downloaded the app.
I'm working with eclipse on windows, so I gave my pc a static ip address and installed the Apache 2.2 web server. After uploading my app, I enable the console and open the console view as you did. Then, I start my app, and I see all the log information in the console.
I find this log information essential, because some services return an error in the emulator, but actually execute successfully on the tv. Many of these services are interacting directly with the tv hardware, and there is no other way to debug them.
I just deployed my app to my iPhone for the first time. Every time it launches it vibrates before running, and it runs fine. The build is a Debug | iPhone one of my app.
Any ideas why it vibrates when it launches and how to stop that? It's definitely not something I coded up and I don't have any exceptions or issues when running in the simulator.
The vibration happens when you build the application in debug mode, and run the application without a debugger waiting. The MonoTouch soft debugger vibrates to inform you that it couldn't find the debugger.
Running the app in Release | iPhone mode solves this.
The number of vibrations is used to notify the user of a problem setting up debugging at startup. The full list (that will be maintained as we expand or modify it) is here:
http://monotouch.net/index.php?title=Documentation/Debugging
As of today:
Device Diagnostics
An application compiled with debug mode that has been deployed on the iPhone will try to contact MonoDevelop on startup on the IP address and port that MonoDevelop had at the time of the build.
If there is an error setting up the debugger, it will vibrate one of more times:
One vibration: The application was compiled with debugging support, but it is unable to reach MonoDevelop on the specified IP address and port to setup stdout/stderr
Two vibrations: It is unable to parse the address configured.
Three vibrations: Could not setup stdout/stderr to the application.
When I try to debug a blackberry application in eclipse by selecting Debug As/Blackberry Simulator the simulator is never launched. The taskbar at the bottom says 'Launching DebugServer: (19%)'. It never gets past 19%. When I select Run As/Blackberry Simulator it works as expected. Any ideas?
The general cause for a hang during debug startup is a problem with some port which is taken at the time of the debug session.
Can you try to close as many application/service as possible? (like, for instance, a VNC server which could use the same TCP port than a debug session)
Then check if you still have this issue.