This type of things usually happens when you don’t switch screens correctly. Check out this related topic which was already asked here
PS: It doesn’t really matters how your app behaves while live testing in the companion, if it’s giving error in compiled APK then there’s something to fix for sure.