Search code examples
androidandroid-studioadb

Running app from android studio not working


when I run my app from android studio to my phone (Sony Z3), it doesn't seem to install correctly. when running to an emulator it works fine, but on the device my anti virus checks it but is not there. I can see it under the app management settings but it wont run. I've been developing for a few months and this is the first time I've seen anything like this so I'm not even sure what code or logs to show you all!!.

I have feeling its the ADB and have tried various things to solve this including reinstalling Android studio and the SDK with no luck. any advice guys as this is driving me mad. I've put some of the logs received below.

PropertyFetcher: AdbCommandRejectedException getting properties for device BH90T0U51L: device offline
PropertyFetcher: AdbCommandRejectedException getting properties for device BH90T0U51L: device offline
DeviceMonitor: ExecutionException getting info for device BH90T0U51L

Solution

  • Go to Settings -> Xperia Connectivity -> Usb Connectivity -> Usb connection mode -> Check MTP mode.

    Click Revoke USB debugging authorization in Developer option and try it again.

    And try sudo adb devices.