androidandroid-studioadbandroid-debug

Android Studio - Unable to debug application


I'm working with a device running Android 5.1 and using Android Studio 3.4.1. I've enabled developer options on my device. See image below.

enter image description here

Now when I connect the USB cable from my Android device to my windows machine and click on the debug icon in Android Studio I get the following errors/messages:

 05/23 09:18:20: Launching app
$ adb push C:\Users\nortonj\Documents\Projects\AndroidApps\transact_esn_registration\app\build\outputs\apk\debug\app-debug.apk /data/local/tmp/TransAct.AccuDate.ESN_SN.Registration
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

See image below of my Android Studio window.

enter image description here

And in the "Select Deployment Target" dialog I see the following:

enter image description here

So a few questions:

  1. Why does my device show as being [OFFLINE]?
  2. I'm new to Android Development. What steps do I need to take to be able to debug this application on my hardware device?

Solution

    1. The device share files with PC
    2. Device is enabled debug mode
    3. Look gradle/app

      buildTypes { debug { debuggable true } release { minifyEnabled true shrinkResources true proguardFiles 'proguard-rules.pro' } }