When I started developing my Android Wear companion app I was unaware that the package name had to be exactly the same in order to connect. So instead of naming it com.example.myapp
, I named it com.example.wear
. I subsequently found out that both package names must be the same, so I changed the companion's package name to com.example.myapp
.
But I am still having trouble to get them to connect. I also noticed that when I try to uninstall the app using the command adb -s emulator-5554 com.example.myapp
, the uninstall fails, but when I use the old package name (com.example.wear
) it succeeds. So the application ID never actually changed.
I found in Module Settings, under the 'Flavors' tag, there is a field for Application ID
. The name here was still the old package name, so I changed it to the new one as well, yet the problem still persists. I have already done a decent amount of work, and I would rather not start over from an older build. Has anyone else ran into this problem? Is there a solution?
EDIT: I have also tried setting applicationId 'com.example.myapp'
under android { defaultConfig { } }
in the the build.gradle
file. Nothing has changed.