【发布时间】:2019-12-07 00:12:56
【问题描述】:
我在 Google Play 控制台发布前报告中收到了许多与不受支持的 API 相关的错误。
发布前报告中列出的错误似乎没有给我提供任何真正有用的(至少对我而言)线索,说明错误在我的代码中的位置。
此页面https://developer.android.com/distribute/best-practices/develop/restrictions-non-sdk-interfaces#studio-lint 建议 Android Studio 可能会给我构建错误或警告,但我什么也没看到。
我是否需要在 AS 的 lint 中启用这些警告,还是应该默认启用,或者是否需要我的项目中的最低目标 API 级别才能在 IDE 中标记这些警告? (我的 AS 安装完全是最新的)。
如果没有,有什么方法可以让我找到关于生成这些警告的代码的线索?
警告示例如下:
API Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V
API Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V
API Landroid/widget/AbsListView;->mIsChildViewEnabled:Z
API Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z
API Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
在我的源代码中搜索这些错误的 sn-ps 不会产生任何结果,因此我不知道如何查找和纠正这些问题。
【问题讨论】:
标签: android-studio lint