Google Play 商店中不支持的 API 警告 [英] Unsupported API warnings in Google Play Store
问题描述
我在 Google Play 的发布前报告中收到以下警告.
I am getting the following warnings in the pre-launch report from Google Play.
我不知道如何纠正这些.感谢任何帮助或建议我在这里遇到很多问题:
I am at a loss as to how to correct these. Any help or recommendations is appreciated I am having lots of issues here:
Android compatibility
We’ve detected that your app is using unsupported APIs. Tests may not have found all unsupported APIs. Learn more
Unsupported
12 warnings identified
The following APIs are greylisted and Google can’t guarantee that they will work on existing versions of Android. Some may be already be restricted for your target SDK
API Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V
11 occurrences identified. Only unique stack traces are shown.
API Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z
1 occurrence identified
API Landroid/media/AudioSystem;->getPrimaryOutputFrameCount()I
1 occurrence identified
API Landroid/media/AudioSystem;->getPrimaryOutputSamplingRate()I
1 occurrence identified
API Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
1 occurrence identified
API Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
1 occurrence identified
API Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
1 occurrence identified
API Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
1 occurrence identified
API Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
1 occurrence identified
API Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;
1 occurrence identified
API Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V
1 occurrence identified
API Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V
1 occurrence identified
推荐答案
这些警告是指使用受限的非 SDK 接口.https://developer.android.com/distribute/最佳实践/开发/限制-非 SDK 接口
These warnings refer to the usage of restricted non-SDK interfaces. https://developer.android.com/distribute/best-practices/develop/restrictions-non-sdk-interfaces
这些调用可能会导致错误行为或应用崩溃.建议避免它们.所有用法都属于黑名单、灰名单或白名单.如果您无法摆脱这些用法,请检查从属关系以列出.只有列入黑名单的调用才会导致崩溃.另外,提醒一下,Android Q (targetSDK=29) 更新了黑名单https://developer.android.com/preview/non-sdk-q
These calls may lead to incorrect behavior or app crashes. It is recommended to avoid them. All usages belong to blacklist, greylist, or whitelist. If you can't get rid of these usages, check affiliation to list. Only blacklisted calls lead to crashes. Also, just to remind, Android Q (targetSDK=29) has updated blacklist https://developer.android.com/preview/non-sdk-q
这篇关于Google Play 商店中不支持的 API 警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!