I have an application almost finished but when I created it I put the minSdk with value 14, which I need to put at least Android 2.3 Greetings.
I have an application almost finished but when I created it I put the minSdk with value 14, which I need to put at least Android 2.3 Greetings.
There are two ways, the first is directly in your AndroidManifest.xml
where you define the property:
in which you define the minimum API in which your application will be supported. The API version for Android 2.3 is 9 , so So much this would be the value:
android: minSdkVersion = 9
The second option is to define the SDK version within your file build.gradle with the minSdkVersion property:
android {
...
...
defaultConfig {
...
minSdkVersion 9
...
...
}
On the documentation you can see the constant to define the API constant for OS Android 2.3 and others.
To the response of @ElenaSys a series of points should be added to be taken into account when making the change, since in Android 2.3 there were not many APIs that are currently used as a base.
The recommendation is to use the Support Library (especially AppCompat ) to take advantage of several of the improvements that have been introduced in later versions of Android .
I think the most common ones are:
Instead of
class ActivityMain extends Activity {
...
}
You should use
class ActivityMain extends AppCompatActivity {
...
}
In case you have a theme defined, instead of
<style name="AppTheme" parent="android:Theme.Light">
...
</style>
You should start using
<style name="AppTheme" parent="Theme.AppCompat.Light">
...
</style>
I gave as an example Theme.AppCompat.Light, but there are other alternatives
This is just a basis for you to get an idea. I leave you two links (in English) so you can get more information.