gpt4 book ai didi

android - 由于 AndroidManifest.xml 存在问题,无法构建 APK

转载 作者:太空宇宙 更新时间:2023-11-03 12:03:04 25 4
gpt4 key购买 nike

出于某种原因,每当我加载我的项目时,我都会立即收到以下错误:

我的AndroidManifest.xml中的代码:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.avi12.palindrome"
android:versionCode="59"
android:versionName="3.3" >

<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="27" />

<application
android:allowBackup="true"
android:debuggable="true"
android:fullBackupContent=""
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity
android:name="com.avi12.palindrome.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--
ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information.
-->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

<activity
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />

<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="com.avi12.palindrome.firebaseinitprovider"
android:exported="false"
android:initOrder="100" />

<meta-data
android:name="android.arch.lifecycle.VERSION"
android:value="27.0.0-SNAPSHOT" />
</application>

</manifest>

我尝试清理项目,但没有帮助,
我不确定是什么导致了这些错误。
因此,我无法构建 APK。
我该如何解决这个问题?谢谢!

最佳答案

android:fullBackupContent=""不能为空所以它应该指向 XML其中应包含定义备份策略的规则

From DocsAndroidManifest.xml , 添加 android:fullBackupContent属性为 <application>元素。此属性指向包含备份规则的 XML 文件。例如:

<application ...
android:fullBackupContent="@xml/my_backup_rules">
</app>

创建一个名为 my_backup_rules.xml 的 XML 文件在res/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>

或者
从错误日志中,您还可以定义 boolean值(value)为

// hasn't test it but
// judging from error android:fullBackupContent (attr)reference|boolean
android:fullBackupContent=false

关于android - 由于 AndroidManifest.xml 存在问题,无法构建 APK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47113305/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com