Android App Bundle构建错误:保留文件 [英] Android App Bundle build error: reserved file

查看:171
本文介绍了Android App Bundle构建错误:保留文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新的应用发布格式Android App Bundle是一种改进的打包应用程序的方式。 Android应用程序包可让您更轻松地以较小的应用程序大小提供出色的体验,从而支持当今可用的各种Android设备。您无需重构代码即可开始从较小的应用程序中受益。

The new app publishing format, the Android App Bundle, is an improved way to package your app. The Android App Bundle lets you more easily deliver a great experience in a smaller app size, allowing for the huge variety of Android devices available today. You don’t need to refactor your code to start benefiting from a smaller app.

我在尝试构建我的应用程序Android Bundle时遇到此错误:

I'm getting this error trying to build my app Android Bundle:


文件 root / AndroidManifest.xml使用保留的文件或目录名称
AndroidManifest.xml。

File 'root/AndroidManifest.xml' uses reserved file or directory name 'AndroidManifest.xml'.

APK生成效果很好

这是我的项目文件结构:

This is my project file structure:

这是我的AndroidManifest.xml,位于 {ProjectName} / app / src / main

And this is my AndroidManifest.xml, located under {ProjectName}/app/src/main:

<?xml version="1.0" encoding="utf-8"?>
            <manifest xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                package="com.XXXX.XXXX"
                android:installLocation="auto">

                <uses-permission android:name="android.permission.INTERNET" />
                <uses-permission android:name="android.permission.WAKE_LOCK" />
                <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

                <!-- These permissions are strongly recommended and will result in higher performance -->
                <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
                <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
                <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
                <uses-permission android:name="android.permission.VIBRATE" />

                <application
                    android:name="com.app.webview.Application"
                    android:allowBackup="true"
                    android:icon="@mipmap/ic_launcher"
                    android:label="@string/app_name"
                    android:supportsRtl="true"
                    android:theme="@style/AppTheme"
                    android:hardwareAccelerated="true">
                    <activity
                        android:name="com.app.webview.MainActivity"
                        android:configChanges="keyboardHidden|orientation|screenSize"
                        android:label="@string/app_name"
                        android:launchMode="singleTask">
                        <intent-filter>
                            <action android:name="android.intent.action.MAIN" />

                            <category android:name="android.intent.category.LAUNCHER" />
                        </intent-filter>

                        <!-- Universal APP Link -->
                        <intent-filter>
                            <action android:name="android.intent.action.VIEW" />

                            <category android:name="android.intent.category.DEFAULT" />
                            <category android:name="android.intent.category.BROWSABLE" />

                            <data android:scheme="http" />
                            <data android:scheme="https" />
                            <data android:host="@string/app_host" />
                        </intent-filter>
                    </activity>

                    <!-- Push -->
                    <!-- Services that handles incoming message -->
                    <service
                        android:name="com.app.webview.Providers.FCM.FcmListenerService">
                        <intent-filter>
                            <action android:name="com.google.firebase.MESSAGING_EVENT" />
                        </intent-filter>
                    </service>

                    <!-- Called if InstanceID token is updated -->
                    <!-- This may occur if the security of the previous token had been compromised -->
                    <service
                        android:name="com.app.webview.Providers.FCM.FcmInstanceIDListenerService"
                        android:exported="true">
                        <intent-filter>
                            <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
                        </intent-filter>
                    </service>

                    <!-- Facebook Config -->
                    <meta-data
                        android:name="com.facebook.sdk.ApplicationId"
                        android:value="@string/id_facebook" />

                    <activity
                        android:name="com.facebook.FacebookActivity"
                        android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
                        android:label="@string/app_name"
                        android:theme="@android:style/Theme.Translucent.NoTitleBar"
                        tools:replace="android:theme" />

                    <provider
                        android:name="com.facebook.FacebookContentProvider"
                        android:authorities="@string/facebook_provider"
                        android:exported="true"
                        tools:replace="android:authorities" />

                    <!-- Fabric -->
                    <meta-data
                        android:name="io.fabric.ApiKey"
                        android:value="XXXX" />
                </application>  
            </manifest>


推荐答案

自10月31日起,Facebook发行了5.1版受众网络SDK。使用

Since October 31, Facebook released version 5.1 of the Audience Network SDK. Using


实现'com.facebook.android:audience-network-sdk:5.1.0'

implementation 'com.facebook.android:audience-network-sdk:5.1.0'

为我解决了这个问题。

这篇关于Android App Bundle构建错误:保留文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆