当前位置: 首页 > 知识库问答 >
问题:

将Android Studio 2.3.2项目导入到Android Studio 3.1.3时,Gradle Build失败(清单合并失败

袁鸿畅
2023-03-14

我正在尝试将Android Studio2.3.2项目导入到Android Studio3.1.3中。而我却出现了以下错误。

下面是AndroidManifest.xml文件

<?xml version="1.0" encoding="utf-8"?>
<!--
  ~  Copyright (C) 2005-2015 Alfresco Software Limited.
  ~
  ~  This file is part of Alfresco Mobile for Android.
  ~
  ~  Licensed under the Apache License, Version 2.0 (the "License");
  ~  you may not use this file except in compliance with the License.
  ~  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~  Unless required by applicable law or agreed to in writing, software
  ~  distributed under the License is distributed on an "AS IS" BASIS,
  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~  See the License for the specific language governing permissions and
  ~  limitations under the License.
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="org.alfresco.mobile.android.application">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <!-- Create AlfrescoAccount & retrieve AlfrescoAccount informations -->
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
    <uses-permission
        android:name="android.permission.GET_ACCOUNTS"
        android:maxSdkVersion="22" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />

    <!-- Responsible for sync operations -->
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.READ_SYNC_STATS" />
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />

    <application
        tools:replace="android:allowBackup"


        android:name="org.alfresco.mobile.android.application.AlfrescoApplication"
        android:allowBackup="false"
        android:configChanges="locale|keyboardHidden|orientation|screenSize"
        android:hardwareAccelerated="true"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:logo="@drawable/ic_application_logo"
        android:theme="@style/AlfrescoMaterialTheme">

        <!-- *************************************************************** -->
        <!-- ALFRESCO APP -->
        <!-- *************************************************************** -->
        <activity
            android:name="org.alfresco.mobile.android.application.activity.WelcomeActivity"
            android:configChanges="locale|keyboardHidden|orientation|screenSize"
            android:label="@string/app_name"
            android:theme="@style/AlfrescoMaterialTheme"
            android:launchMode="singleInstance"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT" />

                <action android:name="android.intent.action.VIEW" />

                <data
                    android:host="view_help_guide"
                    android:scheme="alfresco" />
            </intent-filter>
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT" />
                <action android:name="com.alfresco.android.intent.action.CREATE_ACCOUNT" />
            </intent-filter>
        </activity>
        <activity
            android:name="org.alfresco.mobile.android.application.activity.MainActivity"
            android:configChanges="locale|keyboardHidden|orientation|screenSize"
            android:exported="true"
            android:launchMode="singleTop"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.APPLICATION_RESTRICTIONS_CHANGED" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="org.alfresco.mobile.android.intent.ACTION_SYNCHRO_DISPLAY" />

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

            <!-- Fujitsu scan result -->
            <intent-filter>
                <action android:name="org.alfresco.mobile.android.intent.ACTION_SCAN_RESULT" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.alfresco.android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data
                    android:scheme="alfresco"
                    android:host="document" />
                <data
                    android:scheme="alfresco"
                    android:host="folder" />
                <data
                    android:scheme="alfresco"
                    android:host="file" />
                <data
                    android:scheme="alfresco"
                    android:host="site" />
                <data
                    android:scheme="alfresco"
                    android:host="user" />
                <data
                    android:scheme="alfresco"
                    android:host="tasks" />
                <data />
            </intent-filter>
            <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:path="/"
                    android:host="mobile.alfresco.com"
                    android:scheme="http" />

                <data
                    android:path="/android-app"
                    android:host="mobile.alfresco.com"
                    android:scheme="http" />
            </intent-filter>
        </activity>

        <!-- Private : Passcode Activity -->
        <activity
            android:name=".security.PassCodeActivity"
            android:exported="false"
            android:label="@string/app_name" />

        <activity
            android:name=".activity.InfoActivity"
            android:exported="false"
            android:label="@string/app_name"
            android:theme="@style/AlfrescoMaterialTheme.Dialog" />

        <!-- Private : Text Editor Activity -->
        <activity
            android:name="org.alfresco.mobile.android.application.editors.text.TextEditorActivity"
            android:configChanges="locale|keyboardHidden|orientation|screenSize"
            android:exported="false"
            android:label="@string/file_editor_name"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="org.alfresco.mobile.android.intent.ACTION_CREATE_TEXT" />

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

                <data android:mimeType="text/plain" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.EDIT" />

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

                <data android:mimeType="text/plain" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <!-- used to filter rtf file -->
                <data android:mimeType="text/plain" />
                <data android:mimeType="text/html" />
                <data android:mimeType="text/css" />
                <data android:mimeType="text/xml" />
                <data android:mimeType="text/x-setext" />
                <data android:mimeType="text/x-javascript" />
                <data android:mimeType="text/x-markdown" />
                <data android:mimeType="text/mediawiki" />
                <data android:mimeType="text/sgml" />
                <data android:mimeType="text/tab-separated-values" />
                <data android:mimeType="text/x-vcard" />
            </intent-filter>
        </activity>

        <!-- Public : Official entry point for 3rd party application -->
        <activity
            android:name="org.alfresco.mobile.android.application.activity.PublicDispatcherActivity"
            android:configChanges="locale|keyboardHidden|orientation|screenSize"
            android:exported="true"
            android:icon="@drawable/ic_application_icon"
            android:label="@string/app_name"
            android:logo="@drawable/ic_application_icon"
            android:theme="@style/AlfrescoMaterialTheme.Dialog"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <action android:name="android.intent.action.SEND_MULTIPLE" />

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

                <data android:mimeType="*/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

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

            <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="alfresco" />
            </intent-filter>

        </activity>

        <!-- Internal : Activity As a Dialog -->
        <activity
            android:name="org.alfresco.mobile.android.application.activity.PrivateDialogActivity"
            android:exported="false"
            android:icon="@drawable/ic_application_icon"
            android:label="@string/app_name"
            android:logo="@drawable/ic_application_icon"
            android:theme="@style/AlfrescoMaterialTheme.Dialog"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="org.alfresco.mobile.android.intent.ACTION_DISPLAY_SETTINGS" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="org.alfresco.mobile.android.intent.ACTION_DISPLAY_OPERATIONS" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="org.alfresco.mobile.android.intent.ACTION_START_PROCESS" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="org.alfresco.mobile.android.intent.ACTION_EDIT_NODE" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="org.alfresco.mobile.android.application.intent.IntentAPIDispatcherActivity"
            android:exported="true"
            android:theme="@style/MainTheme.Dialog">
            <intent-filter>
                <action android:name="com.alfresco.android.intent.action.CREATE" />

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

                <data android:mimeType="image/jpg" />
                <data android:mimeType="text/plain" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.alfresco.android.intent.action.SEND" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.alfresco.android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="org.alfresco.mobile.android.application.widgets.ActionShortcutActivity"
            android:theme="@style/AlfrescoMaterialTheme.Dialog"
            android:label="@string/shortcut_actions_title"
            android:enabled="@bool/widgetEnabled">
            <intent-filter>
                <action android:name="android.intent.action.CREATE_SHORTCUT" />

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

        <activity
            android:name="org.alfresco.mobile.android.application.widgets.FolderShortcutActivity"
            android:theme="@style/AlfrescoMaterialTheme.Dialog"
            android:label="@string/shortcut_title"
            android:enabled="@bool/widgetEnabled">
            <intent-filter>
                <action android:name="android.intent.action.CREATE_SHORTCUT" />

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

        <!-- *************************************************************** -->
        <!-- WIDGET -->
        <!-- *************************************************************** -->
        <receiver
            android:name="org.alfresco.mobile.android.application.widgets.ToolbarWidgetProvider"
            android:enabled="@bool/widgetEnabled">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>

            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/toolbar_widget" />
        </receiver>
        <!-- *************************************************************** -->
        <!-- CONTENT PROVIDER -->
        <!-- *************************************************************** -->
        <provider
            android:name=".providers.FavoritesProviderImpl"
            android:authorities="${PROVIDER_AUTHORITY}.favorites"
            android:exported="false"
            android:label="@string/sync_favorites"
            android:syncable="true" />
        <provider
            android:name=".providers.SyncProviderImpl"
            android:authorities="${PROVIDER_AUTHORITY}.sync"
            android:exported="true"
            android:label="@string/sync_title"
            android:syncable="true" />
        <provider
            android:name="org.alfresco.mobile.android.application.providers.MimeTypeProviderImpl"
            android:authorities="${PROVIDER_AUTHORITY}.mimetypes"
            android:exported="false" />
        <provider
            android:name="org.alfresco.mobile.android.application.providers.OperationsProviderImpl"
            android:authorities="${PROVIDER_AUTHORITY}.operations"
            android:exported="false" />
        <provider
            android:name="org.alfresco.mobile.android.application.providers.search.HistorySearchProvider"
            android:authorities="${PROVIDER_AUTHORITY}.searches"
            android:exported="false" />
        <provider
            android:name="org.alfresco.mobile.android.application.providers.storage.StorageAccessDocumentsProvider"
            android:authorities="${PROVIDER_AUTHORITY}.documents"
            android:enabled="@bool/atLeastKitKat"
            android:exported="true"
            android:grantUriPermissions="true"
            android:permission="android.permission.MANAGE_DOCUMENTS">
            <intent-filter>
                <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
            </intent-filter>
        </provider>

        <!-- *************************************************************** -->
        <!-- SERVICES -->
        <!-- *************************************************************** -->
        <service
            android:name="org.alfresco.mobile.android.sync.SyncContentService"
            android:exported="true"
            tools:ignore="ExportedService">
            <intent-filter>
                <action android:name="android.content.SyncAdapter" />
            </intent-filter>

            <meta-data
                android:name="android.content.SyncAdapter"
                android:resource="@xml/sync_adapter" />
        </service>


        <service
            android:name="org.alfresco.mobile.android.platform.favorite.FavoritesService"
            android:exported="true"
            tools:ignore="ExportedService">
            <intent-filter>
                <action android:name="android.content.SyncAdapter" />
            </intent-filter>

            <meta-data
                android:name="android.content.SyncAdapter"
                android:resource="@xml/favorites_adapter" />
        </service>


        <!-- Used For AlfrescoAccount Authentication -->
        <service
            android:name="org.alfresco.mobile.android.application.accounts.AccountAuthenticationService"
            android:exported="true"
            tools:ignore="ExportedService">
            <intent-filter>
                <action android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>

            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator" />
        </service>

        <service
            android:name="org.alfresco.mobile.android.platform.io.FileCleanerService"
            android:exported="false" />

        <service
            android:name="org.alfresco.mobile.android.async.UploadRetryService"
            android:exported="false" />

        <!-- *************************************************************** -->
        <!-- EXTENSION : SAMSUNG -->
        <!-- *************************************************************** -->
        <!-- SAMSUNG Multi Windows. -->
        <uses-library
            android:name="com.sec.android.app.multiwindow"
            android:required="false" />

        <meta-data
            android:name="com.sec.android.support.multiwindow"
            android:value="true" />
        <meta-data
            android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
            android:resource="@dimen/app_defaultsize_w" />
        <meta-data
            android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
            android:resource="@dimen/app_defaultsize_h" />
        <meta-data
            android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W"
            android:resource="@dimen/app_minimumsize_w" />
        <meta-data
            android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H"
            android:resource="@dimen/app_minimumsize_h" />

        <!-- *************************************************************** -->
        <!-- EXTENSION : ANDROID FOR WORK -->
        <!-- *************************************************************** -->
        <meta-data
            android:name="android.content.APP_RESTRICTIONS"
            android:resource="@xml/app_restrictions" />

        <!-- *************************************************************** -->
        <!-- DEPRECATED -->
        <!-- *************************************************************** -->
        <!-- Accounts are managed by Android AccountManager. -->
        <!-- Still available for migration from older version. (version <1.5) -->
        <provider
            android:name="org.alfresco.mobile.android.application.providers.AccountProviderImpl"
            android:authorities="${PROVIDER_AUTHORITY}.accounts"
            android:exported="false" />
    </application>

</manifest>

共有1个答案

丌官哲彦
2023-03-14

它已经提供给您到工具:替换添加标签在您的行:

建议:将'tools:replace=“android:allowbackup”‘添加到AndroidManifest.xml:42:5-461:19的元素中,以重写。alfresco-mobile-android主清单(此文件),第45行

 类似资料:
  • 这是我的毕业生: 这是我的Android清单:

  • 问题内容: 嗨,我正在开发SDK,当我将这些SDK添加到应用程序Proyect中时,出现以下错误: 清单合并失败:[com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91的属性application @ appComponentFactory value =(android.support.v4.app.Cor

  • 错误:任务“:app:ProcessDebugManifest”执行失败。 清单合并失败:来自AndroidManifest.xml:13:9-42的属性application@icon value=(@mipmap/appiconnew)也存在于[com.pnikosis:materialish-progress:1.0]AndroidManifest.xml:13:9-45 value=(@d

  • 清单合并失败:[com.android.support:percent:26.0.2]androidmanifest.xml:25:13-35中的属性元数据#android.support.version@value value=(26.0.2)也出现在[com.android.support:support-v4:26.1.0]androidmanifest.xml:28:13-35 value

  • 我似乎得到了这样的错误:

  • 问题内容: 我正在将当前项目的大型应用程序移至Android Studio和Gradle中。我目前陷入以下问题: 我尝试将以下属性添加到主文件: 这些属性定义都不起作用。我究竟做错了什么? 问题答案: 试试看: 将此添加到 将此添加到 基于此,它应该覆盖所有元素。“将低优先级声明替换为带注释的声明。”