Android Wear debug app gone after reboot - wear-os

When I develop my Wear App and install (run) it via USB from Android Studio, everything works fine. Even when I disconnect the Watch from USB, it still works, and it remains in the Wear Launcher.
But after rebooting the Watch, my app is gone. Why?

I had the same problem and I think it has something to do with installing the debug version after uninstalling the release version. I found the following lines in the log at device start:
08-03 17:50:51.908: I/WearablePkgInstaller(617): Sending uninstall intent to PackageInstaller Intent { act=com.google.android.clockwork.packagemanager.UNINSTALL_PACKAGE pkg=com.google.android.clockwork.packageinstaller (has extras) } for de.eseidinger.myapp
08-03 17:50:52.123: I/WearablePkgInstaller(807): Sent delete request for de.eseidinger.myapp
08-03 17:50:52.237: I/ActivityManager(445): Force stopping de.eseidinger.myapp appid=10029 user=-1: uninstall pkg
08-03 17:50:52.240: I/ActivityManager(445): Force stopping de.eseidinger.myapp appid=10029 user=0: pkg removed
These lines tell me that my app was uninstalled at startup but not why. Right before these lines were lines like the following:
08-03 17:50:51.902: I/WearablePkgInstaller(617): Fingerprint, force install, and device fingerprint are unchanged for com.google.android.music
So maybe it has something to do with my debug version not being signed.
Anyway... What helped was doing a factory reset on my watch AND phone.

Related

Cannot run my App on a device disconnected from Xcode

With the last version of Xcode (12.0), I do not succeed to run my App on my device without usb cable.
When connected, the app is installed and works well, but when I remove the cable the App closes and I cannot reopen it...
Then, I have an alert on Xcode saying "Lost connection to the debugger..."
I tried to modify the Runner configuration settings with Releaser and Debug, but same results.
For info: I am using Flutter sdk.
Please help..

LLDB RPC server freezes app

For the past months I have not been able to debug macOS or iOS apps through Xcode. What happens is the following:
Build and run app from Xcode.
Xcode says app is running, but no app has appeared and no debug output from app either.
Kill the process lldb-rpc-server.
App appears and runs as normal, but Xcode is no longer debugging.
Start a new debugging session by attaching it to the app's process.
App freezes again, until lldb-rpc-server is killed.
This OpenRadar has the same description.
I have tried re-installing Xcode (including command-line tools), but it didn't help. Any ideas?
Xcode: Version 9.3.1 (9E501)
MacOS: 10.13.4 (17E199)
The cause of this was that I had installed a GDB/LLDB-extension called Voltron. I was unaware that the installation also created/modified the .lldbinit in the home folder. Removing this file fixed the issue. See also this issue for Voltron.
Got some very good help from Apple.
I had received this warning msg when device was locked and I was running app on device, so when device is unlocked this warning goes

Appcelerator doesn't work with genymotion

I cannot get appcelrator to work with Genymotion.
Everytime i "run" - that is, hit the green run button in the top-left - i get [ERROR] : Failed to install apk on "192.168.25.101:5555"
[ERROR] : Error: device not found
This isn't useful nor is it helpful.
I can manually drag the created .apk file into genymotion and it will run it (although, irritatinly, it immediately crashes as I'm upgrading an old app to whatever new style appcelerator have decided on).
All the posts on this are from 2014 and not very useful - I also cannot get appcelerator running genymotion on a blank new project.
I installed genymotion to a different directory, but appcelerator seems to find it and start it - i can see genymotion start up.
What am i missing?
Sometimes I have seen the Appcelerator emulator wait startup timeout before Appcelerator can send the APK. What I have done is start the emulator first independent of the 'run' command in Appcelerator, then select the emulator from Appcelerator and then Run. If the emulator has started, then it will send it without having to drag/drop the apk manually.

Xcode Run Apple Watch target results in Finished running app on Watch

I am trying to debug my watch app. I build and try to run as usual. It says Build succeeded, installing to watch etc. but then, instead of launching my app, it says Finished running app on watch. I've restarted Xcode, reinstalled my app on watch etc. but no avail.
What am I doing wrong?
I've also restarted my Mac, my iPhone and my Watch. It then worked.
I restarted everything and it still didn't work. However, after the restart when I first run the app I received an error: Device doesn’t support wireless sync. With this, after disabling the wifi on the watch, things went back to normal.
From my experience, restarting all devices (iPhone, watch, and mac) sometimes allows the app to build on the watch, but it is very frustrating and a long process for a "maybe."
Especially when I get the Device doesn't support wireless sync. the most consistent solve has been disabling wifi on both the watch and the iPhone. Also, have the iPhone connected directly to the computer with a genuine cord.
Good luck.
Also, if you were using the simulator, stop it and quit the simulator before trying to compile to the real device.
You just have to attach the Xcode debugger to the process which is running on the watch!
Xcode -> Debug -> Attach to Process > "name of your app watch extension"
After that Xcode displays "Running ... Extension on Apple Watch" and you can start debugging

Proper way to debug watchos2 app in XCode7

I'm rewriting my watch app to work in watchos2 but have problems debugging on the actual watch (XCode7). What is the correct way how to do this?
1) Obvious (but naive) approach - connect your phone with paired watch, in XCode select Extension scheme to run on Phone + Watch. Click play and it should work, right? This seems to work only just after fresh pairing and breaks very quickly (after few debug runs). See issues and behaviour below
2) Run phone app first then add run of extension - this approach worked for me longer but eventually broke as well.
3) Unpair and pair again - more than painful experience, time consuming and not practical at all. Will help for a while though.
Main problems:
phone app not communicating - I've seen not reachable or messages just time out
watch app stops running - XCode is saying it's running but it's not - won't even attach. If I run it manually on watch most of the times it will attach but then the phone app is not reachable
watch app won't even install - I suspect when the XCode is saying it's running it in fact it doesn't because when I remove the app from watch and then run XCode goes through the whole install process and "running" but the icon doesn't even appear on the main screen
phone stops reacting when I use option 2) and try to run something else while app is attached
phone seems to be blocked, selecting other apps (even going back to my app) won't work until I kill the session
Setup: The phone and watch is paired correctly, phone can see watch, watch can see phone, other apps are working. Watch "trusts" the computer as well, app is "shown on apple watch". Phone is 5s 9.0.1.
I've tried various restart combinations (phone|watch|xcode|mac), shuffled cables, disconnect, reconnect, etc. but that didn't help either.
Did anybody find a usable way how to debug watchos2 app from XCode? Nobody else seems to be complaining about this with released XCode7 though I've seen lots of similar issues in beta builds.
Use Apple watch recharging cable, connect your watch to developing Mac that runs Xcode.
It provides much more successful and fast debugging.
I have been dealing with the same issue this last days, I just updated to iOS 9.2, watchOS 2.1 and XCode 7.2, and now everything works.
After update XCode to 7.2, iOS9.2 my phone and WatchOS2.1 my Apple Watch the debug process is better. I suggest to update all your devices.

Resources