Unable to resolve target ‘android-X’ (where ‘x’ – api level eg: android-8 )
This Error occurs because ,u have created a project to run for a particular Api Level(eg: android-7) and you are running that project in another Api Level (eg:android-8)
So if u want your already created project to run in another Api Level,
1. Change the target in your default.properties/project.properties file in your project to the Api level u need.
eg:-Change target=android-7 to target=android-8
default.properties may look like this:-
# This file is automatically generated by Android Tools.
# Do not modify this file — YOUR CHANGES WILL BE ERASED!
# This file must be checked in Version Control Systems.
# To customize properties used by the Ant build system use,
# “build.properties”, and override values to adapt the script to your
# project structure.
# Project target.