Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁知道如何在代码中获取 android 版本,例如我需要这样的东西
text.setText(somemethod.getAndroidVersion().toString());
这是你要找的吗?
android.os.Build.VERSION.SDK_INT;
你也可以试试这个Build.VERSION.RELEASE;
Build.VERSION.RELEASE;