0

i wrote an application on Android Studio, news feed on firebase from google (i'm beginner in Android). The program works fine, but only on the lastest versions of Android. Is there a function to indicate the version (in the code i used ViewPager, TableLayout,, maybe they only work on new devices?)

MbProger
  • 5
  • 3
  • Possible duplicate of [Changing API level Android Studio](https://stackoverflow.com/questions/19465049/changing-api-level-android-studio) – Quinn Aug 16 '19 at 16:03

2 Answers2

1

Is there a function to indicate the version

This is controlled by minSdkVersion, set in your app module's build.gradle file (e.g., app/build.gradle for a typical Android Studio starter project).

in the code i used ViewPager, TableLayout,, maybe they only work on new devices?

TableLayout has existed since Android 1.0. ViewPager works back to Android 4.0.

CommonsWare
  • 910,778
  • 176
  • 2,215
  • 2,253
  • 1
    minSdkVersion -> 15 – MbProger Aug 16 '19 at 16:08
  • targetSdkVersion -> 29 – MbProger Aug 16 '19 at 16:08
  • @MbProger: So, your app is advertising that it supports Android 4.0 and higher. If you want to support fewer Android versions than that, raise the `minSdkVersion` to a higher level. The [distribution dashboards](https://developer.android.com/about/dashboards/) will help you determine how popular older versions of Android are. – CommonsWare Aug 16 '19 at 16:26
0

In the build.gradle file under the android section there is a field named compileSdkVersion, change it to change the minimum API