Я работаю над Android MDM и имею файл app_restrictions.xml в папке /src/main/res/xml/. Используемый мной MDM не показывает мне значение ограничения, даже значение по умолчанию. Все шаги, указанные в этой ссылке, были выполнены для установки ограничений приложения: https://developer.android.com/training/enterprise/app-restrictions.html, но я получаю пакет [EMPTY_PARCEL]. ниже код
app_restrictions.xml
<?xml version="1.0" encoding="utf-8"?>
<restrictions xmlns:android="http://schemas.android.com/apk/res/android">
<restriction
android:key="MDMEmailKey"
android:title="Email"
android:restrictionType="string"
android:description="@string/email_address_mdm_description"
android:defaultValue="[email protected]" />
<restriction/>
</restrictions>
Кроме того, ворс показывает мне ниже ошибки, хотя я смог подавить его в градации с помощью параметров ворса, но просто интересно, не является ли это причиной проблемы, с которой я столкнулся. Пожалуйста, дайте мне знать, почему я получаю эти ошибки.
Executing task ':project_name:lintVitalRelease' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
.../src/main/res/xml/app_restrictions.xml:8: Error: Missing required attribute android:key [ValidRestrictions]
<restriction/>
~~~~~~~~~~~~~~
.../src/main/res/xml/app_restrictions.xml:8: Error: Missing required attribute android:restrictionType [ValidRestrictions]
<restriction/>
~~~~~~~~~~~~~~
.../src/main/res/xml/app_restrictions.xml:8: Error: Missing required attribute android:title [ValidRestrictions]
<restriction/>
~~~~~~~~~~~~~~
Explanation for issues of type "ValidRestrictions":
Ensures that an applications restrictions XML file is properly formed
https://developer.android.com/reference/android/content/RestrictionsManager.html
3 errors, 0 warnings