NonSdkApi

非 sdk API 及其與其他元資料一起呼叫的範例 請參閱https://developer.android.com/distribute/best-practices/develop/restrictions-non-sdk-interfaces

JSON 表示
{
  "apiSignature": string,
  "invocationCount": integer,
  "list": enum (GreyList),
  "exampleStackTraces": [
    string
  ],
  "insights": [
    {
      object (NonSdkApiInsight)
    }
  ]
}
領域
apiSignature

string

Non-SDK API的簽名

invocationCount

integer

觀察到此 API 被呼叫的總次數。

list

enum ( GreyList )

該API出現在哪個清單中

exampleStackTraces[]

string

呼叫此 API 的範例堆疊追蹤。

insights[]

object ( NonSdkApiInsight )

針對非 SDK API 違規的可選調試見解。

非SdkApiInsight

非 SDK API 見解(用於解決偵錯解決方案)。

JSON 表示
{
  "matcherId": string,
  "exampleTraceMessages": [
    string
  ],

  // Union field insight can be only one of the following:
  "upgradeInsight": {
    object (UpgradeInsight)
  },
  "pendingGoogleUpdateInsight": {
    object (PendingGoogleUpdateInsight)
  }
  // End of list of possible types for union field insight.
}
領域
matcherId

string

一個唯一的 ID,用於確定匹配器上下文中此特定洞察的有效性。 (必需的)

exampleTraceMessages[]

string

可選的示例堆疊跟踪,適用此見解(應該至少有一個)。

聯盟實地insight

insight只能是以下之一:

upgradeInsight

object ( UpgradeInsight )

洞察顯示隱藏的 API 使用源自於需要升級的庫的使用。

pendingGoogleUpdateInsight

object ( PendingGoogleUpdateInsight )

一項見解表明隱藏的 API 使用源自 Google 提供的程式庫。

升級洞察

此見解建議將給定庫升級到指定版本,以避免對非 SDK API 的依賴。

JSON 表示
{
  "packageName": string,
  "upgradeToVersion": string
}
領域
packageName

string

要升級的套件的名稱。

upgradeToVersion

string

建議升級到的版本。可選:如果我們不確定哪個版本可以解決此問題

等待 GoogleUpdateInsight

此見解表明隱藏的 API 使用源自 Google 提供的程式庫。用戶無需採取任何操作。

JSON 表示
{
  "nameOfGoogleLibrary": string
}
領域
nameOfGoogleLibrary

string

Google 提供的具有非 SDK API 依賴項的程式庫的名稱。