Sunday, September 20, 2020

Weird 'sdk version' problem with Android Studio debugging on phone

 I'm seeing error "the app doesn't support sdk version of the device (1)" from Android Studio when I try to run one of my App on a phone with USB debug just enabled. The error message is quite misleading. The phone has Android 8.1.0, which is API 27. My App build gradle file has minimum SDK version set to 15, compile and target SDK set to 28. So there is no reason of the error.

By Googling, it brought me to this Stack Overflow post: ADB Android Device Unauthorized

Usually after the USB debug just enabled, ADB won't work properly for the first time. So disconnect and reconnect USB will solve the problem. And that also solved the SDK version complain issue.


0 Comments:

Post a Comment