嵌套類 |
---|
class | GceAvdInfo.LogFileEntry |
字段
構建變量
public static final BUILD_VARS
公共構造函數
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort)
參數 |
---|
instanceName | String |
hostAndPort | HostAndPort |
GceAvdInfo
public GceAvdInfo (String instanceName,
HostAndPort hostAndPort,
ErrorIdentifier errorType,
String errors,
GceAvdInfo.GceStatus status)
參數 |
---|
instanceName | String |
hostAndPort | HostAndPort |
errorType | ErrorIdentifier |
errors | String |
status | GceAvdInfo.GceStatus |
公共方法
getBuildVars
public getBuildVars ()
返回 GCE AVD 設備的構建變量信息哈希。
可能的構建變量鍵在 BUILD_VARS 中有描述,例如:build_id、build_target、branch、kernel_build_id、kernel_build_target、kernel_branch、system_build_id、system_build_target、system_branch、emulator_build_id、emulator_build_target、emulator_branch。
獲取設備偏移量
public Integer getDeviceOffset ()
得到錯誤
public String getErrors ()
獲取實例用戶
public String getInstanceUser ()
獲取日誌
public getLogs ()
將映射從本地或遠程日誌路徑返回到類型。
主機和端口
public HostAndPort hostAndPort ()
實例名稱
public String instanceName ()
public boolean isIpPreconfigured ()
解析GceInfoFromFile
public static GceAvdInfo parseGceInfoFromFile (File f,
DeviceDescriptor descriptor,
int remoteAdbPort)
解析給定文件以獲取 GCE AVD 設備信息。
參數 |
---|
f | File : ERROR(/File) 文件,用於從 GCE 驅動程序讀取 JSON 輸出。 |
descriptor | DeviceDescriptor :需要信息的設備的描述符。 |
remoteAdbPort | int :應該用於 adb 連接的遠程端口 |
parseGceInfoFromOxygenClientOutput
public static parseGceInfoFromOxygenClientOutput (CommandResult oxygenRes,
int remoteAdbPort)
解析 Oxygen 客戶端二進製文件的給定命令行輸出以獲取租用的 AVD 信息。
參數 |
---|
oxygenRes | CommandResult :來自 Oxygen 客戶端命令執行的CommandResult 。 |
remoteAdbPort | int :應該用於 adb 連接的遠程端口 |
parseGceInfoFromString
public static GceAvdInfo parseGceInfoFromString (String data,
DeviceDescriptor descriptor,
int remoteAdbPort)
解析給定的字符串以獲取 GCE AVD 設備信息。
參數 |
---|
data | String :JSON 字符串。 |
descriptor | DeviceDescriptor :需要信息的設備的描述符。 |
remoteAdbPort | int :應該用於 adb 連接的遠程端口 |
設置設備偏移量
public void setDeviceOffset (Integer deviceOffset)
設置錯誤類型
public void setErrorType (ErrorIdentifier errorType)
參數 |
---|
errorType | ErrorIdentifier |
設置錯誤
public void setErrors (String errors)
設置實例用戶
public void setInstanceUser (String instanceUser)
public void setIpPreconfigured (boolean isIpPreconfigured)
參數 |
---|
isIpPreconfigured | boolean |
到字符串
public String toString ()
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-06-06 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]