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?)
            Asked
            
        
        
            Active
            
        
            Viewed 46 times
        
    2 Answers
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
        
- 986,068
- 189
- 2,389
- 2,491
- 
                    1
- 
                    
- 
                    @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
- 
                    1`compileSdkVersion` does not affect the minimum API level that the app can run on. – CommonsWare Aug 16 '19 at 16:03
