简体   繁体   English

android studio上的程序无法在旧设备(Android 6及更低版本)上运行,是否有功能指定最低版本?

[英]The program on android studio does not run on old devices (android 6 and below), is there a function to specify the minimum version?,

i wrote an application on Android Studio, news feed on firebase from google (i'm beginner in Android). 我在Android Studio上编写了一个应用程序,在Google的Firebase上提供了新闻提要(我是Android的初学者)。 The program works fine, but only on the lastest versions of Android. 该程序可以正常运行,但仅适用于最新版本的Android。 Is there a function to indicate the version (in the code i used ViewPager, TableLayout,, maybe they only work on new devices?) 是否有一个功能来指示版本(在我使用ViewPager,TableLayout的代码中,也许它们仅适用于新设备?)

Is there a function to indicate the version 是否有指示版本的功能

This is controlled by minSdkVersion , set in your app module's build.gradle file (eg, app/build.gradle for a typical Android Studio starter project). 这由minSdkVersion控制,可在应用模块的build.gradle文件中设置(例如,对于典型的Android Studio入门项目,为app/build.gradle )。

in the code i used ViewPager, TableLayout,, maybe they only work on new devices? 在我使用ViewPager,TableLayout的代码中,也许它们仅适用于新设备?

TableLayout has existed since Android 1.0. 自Android 1.0起, TableLayout就已经存在。 ViewPager works back to Android 4.0. ViewPager可回溯至Android 4.0。

在android部分下的build.gradle文件中,有一个名为compileSdkVersion的字段,对其进行更改以更改最小的API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM