一句话:通过 11 个 Android 版本和 4,936 个应用的实证研究,揭示 API 演进导致的兼容问题与常见支持代码模式。
Android OS 及其版本频繁发布,给 Android 应用带来大量兼容性问题。本文针对版本演进引发的兼容性问题开展大规模实证研究,覆盖 11 个 Android 版本与 4,936 个应用。研究发现相邻版本 API 变化剧烈:平均每版新增 140.8 个类型、1,505.6 个方法和 979.2 个字段;Support Library 仅支持不到 23% 的新增方法,对新增类型和字段支持更少。因此,91.84% 的应用需编写额外代码支持不同 OS 版本,其中 88.65% 的支持代码采用同一模式:将 android.os.Build.VERSION.SDK_INT 与常量版本号比较,以调用特定版本 API。论文在此基础上研究并处理此类兼容问题。
The frequent release of Android OS and its various versions bring many compatibility issues to Android Apps. This paper studies and addresses such evolution-induced compatibility problems. We conduct an extensive empirical study over 11 different Android versions and 4,936 Android Apps. Our study shows that there are drastic API changes between adjacent Android versions, with averagely 140.8 new types, 1,505.6 new methods, and 979.2 new fields being introduced in each release. However, the Android Support Library (provided by the Android OS) only supports less than 23% of the newly added methods, with much less support for new types and fields. As a result, 91.84% of Android Apps write additional code to support different OS versions. Furthermore, 88.65% of the supporting codes share a common pattern, which directly compares variable android.os.Build.VERSION.SDK_INT with a constant version number, to use an API of particular versions.
DOI 原文 ·
@inproceedings{paperbot4778,
title = {Understanding and detecting evolution-induced compatibility issues in Android apps},
author = {Dongjie He and Lian Li and Lei Wang and Hengjie Zheng and Guangwei Li and Jingling Xue},
booktitle = {ASE},
year = {2018},
doi = {10.1145/3238147.3238185}
}