Home

targetSdkVersion

targetSdkVersion is a setting used in Android app development to indicate the API level against which the application has been tested and is expected to operate. It is typically declared in the app’s manifest or build configuration and, together with minSdkVersion, guides how the system applies platform behavior changes.

The targetSdkVersion informs the Android runtime which compatibility modes to enable for the app. When an app

Practical implications include differences in permission handling and background behavior. For example, apps with targetSdkVersion less

Setting and updating targetSdkVersion is distinct from minSdkVersion, which specifies the oldest Android version the app

runs
on
a
device
with
a
newer
API
level
than
its
target,
the
system
may
apply
certain
legacy
behaviors
to
preserve
compatibility.
Conversely,
setting
a
high
targetSdkVersion
signals
that
the
app
is
prepared
for
newer
platform
features
and
behavior
changes,
allowing
the
system
to
enable
newer
restrictions
and
optimizations.
than
23
are
subject
to
the
older
install-time
permission
model,
while
those
targeting
API
23
or
higher
are
required
to
request
dangerous
permissions
at
runtime.
Other
platform
changes,
such
as
restrictions
introduced
for
background
services
or
notification
handling
in
newer
Android
versions,
may
also
depend
on
the
targetSdkVersion
being
aligned
with
the
current
API
level.
supports.
Developers
should
regularly
update
targetSdkVersion
to
the
latest
stable
API
level
and
thoroughly
test
the
app
to
ensure
compatibility
and
to
take
advantage
of
newer
platform
optimizations.