【问题标题】:Invalid JSON payload received. Unknown name "KioskCustomization" at 'policy': Cannot find field收到无效的 JSON 有效负载。 “策略”中的未知名称“KioskCustomization”:找不到字段
【发布时间】:2021-08-01 15:41:53
【问题描述】:

我无法将 KioskCustomization 与 installType KIOSK 一起使用,出现以下错误

googleapiclient.errors.HttpError:https://androidmanagement.googleapis.com/v1/enterprises/myeidhere/policies/policy1?alt=json 时返回“收到无效的 JSON 有效负载。'policy' 中的未知名称“KioskCustomization”:找不到字段。”。详细信息:“[{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'policy', 'description': '收到无效的 JSON 有效负载。未知名称“策略”中的“KioskCustomization”:找不到字段。'}]}]">

我的政策 json

   {
    "safeBootDisabled": true,
    "factoryResetDisabled": true,
    "bluetoothDisabled": true,
    "wifiConfigDisabled": true,
    "networkEscapeHatchEnabled": true,
    "addUserDisabled": true,
    "uninstallAppsDisabled": true,
    "mountPhysicalMediaDisabled": true,
    "modifyAccountsDisabled": true,
    "mobileNetworksConfigDisabled": true,
    "vpnConfigDisabled": true,
    "networkResetDisabled": true,
    "outgoingCallsDisabled": true,
    "usbFileTransferDisabled": true,
    "setWallpaperDisabled": true,
    "deviceOwnerLockScreenInfo": { 
        "defaultMessage": "some message"
    },
    "openNetworkConfiguration": {
        "NetworkConfigurations": [{
            "GUID": "a",
            "Name": "somename",
            "Type": "WiFi",
            "WiFi": {
                "SSID": "somessid",
                "Security": "WPA-PSK",
                "Passphrase": "notsharing",
                "AutoConnect": true
            }
        }]
    },
    "applications": [{
        "defaultPermissionPolicy": "GRANT",
        "installType": "FORCE_INSTALLED",
        "packageName": "com.leadschool.parentapp"
    },
    {
        "installType": "KIOSK",
        "packageName": "com.akshara.launchapp",
        "defaultPermissionPolicy": "GRANT"
    },
    {
        "installType": "FORCE_INSTALLED",
        "packageName": "letest.ncertbooks"
    },
    {
        "installType": "FORCE_INSTALLED",
        "packageName": "karnataka.board.textbooks"
    },
    {
        "installType": "FORCE_INSTALLED",
        "packageName": "com.google.android.apps.messaging"
    },
    {
        "installType": "FORCE_INSTALLED",
        "packageName": "com.amaze.filemanager"
    }],
    "KioskCustomization": {
        "powerButtonActions": "POWER_BUTTON_AVAILABLE",
        "systemNavigation": "HOME_BUTTON_ONLY",
        "statusBar": "SYSTEM_INFO_ONLY",
        "deviceSettings": "SETTINGS_ACCESS_BLOCKED"
    }
    }

【问题讨论】:

    标签: android-management-api


    【解决方案1】:

    乍一看,我没有发现任何问题,但可能是因为这个案例吗?

    在 Android Management API 网站上,您可以在实施之前先尝试一下,Ref

    我看到密钥是kioskCustomization,所以试试用小写的“k”

    请告诉我你的结果

    【讨论】:

    • 嗨@Sudhu 它适用于小写,非常感谢
    猜你喜欢
    • 1970-01-01
    • 2018-08-01
    • 2021-06-25
    • 1970-01-01
    • 1970-01-01
    • 2020-10-25
    • 2019-09-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多