[英]No resource identifier found for attribute 'linearLayoutOrientation' in package 'android'
[英]No resource identifier found for attribute 'domain' in package 'android'
運行我的應用程序時出現以下錯誤:
MyApp \\ app \\ build \\ intermediates \\ manifests \\ full \\ debug \\ AndroidManifest.xml錯誤:(38)在程序包“ android”中找不到屬性“ domain”的資源標識符。
有人請幫忙。 提前致謝。
這是我的AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.trial.myapp">
<!--xmlns:android="http://schemas.android.com/apk/res/android"-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:allowBackup="true"
android:backupAgent="MyApp_BackupAgent">
<meta-data android:name="com.google.android.backup.api_key"
android:value="API-KEY" />
<!-- for backuping to google drive starts here-->
<full-backup-content>
<include
android:domain="database"
android:path=".">
</include>
</full-backup-content>
<!-- for backuping to google drive ends here-->
<activity android:name=".MyApp_MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
您必須按照此鏈接中所述進行操作
(i)在AndroidManifest.xml
,將android:fullBackupContent
屬性添加到元素。 此屬性指向包含備份規則的XML文件。
<application
...
android:fullBackupContent="@xml/my_backup_rules">
</application>
(ii)在res/xml/
目錄中創建一個名為my_backup_rules.xml
的XML文件。 在文件內部,添加帶有<include>
和<exclude>
元素的規則。 以下示例備份了除device.xml
之外的所有共享首選項:
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
</full-backup-content>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.