It looks like you only have the SDK for Android 7.0 installed, you need the SDK for Android 5.1.1 (API 22) if your device is running that version of Android.
You might also try installing the Google APIs for that version, otherwise I am not sure what is causing your error. It might be possible that something is slightly off with your appium capabilities. Are you able to run tests on an emulator or other device?
I am able to run test using Automation Name as ‘Appium’.
Also, I have a query : When I enter android in command prompt, it gives an error ‘android not recognised as an internal or external command’, instead of opening Android SDK manager.
Can this be root cause of issue faced?
If yes, do I need to reinstall android, as all environment settings are proper.