首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >原因:重复条目: AndroidManifest.xml

原因:重复条目: AndroidManifest.xml
EN

Stack Overflow用户
提问于 2020-06-28 18:55:15
回答 1查看 1.8K关注 0票数 3

我使用的是从codecanyon.net下载的项目,该项目使用错误消息失败了Gradle构建。我试着用类似的问题复习其他问题,但没有一个问题对我有用。请任何人都能帮我解决这个问题

原因:重复条目: AndroidManifest.xml

下面是清单文件

代码语言:javascript
复制
    <?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.dreams.chat">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

    <application
        android:name=".BaseApplication"
        android:allowBackup="false"
        android:appComponentFactory="whateverString"
        android:hardwareAccelerated="true"
        android:icon="@drawable/ic_logo_"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        tools:replace="android:allowBackup,android:appComponentFactory">
        <activity
            android:name=".activities.MainActivity"
            android:launchMode="singleTop"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden|adjustResize" />
        <activity
            android:name=".activities.ChatActivity"
            android:parentActivityName=".activities.MainActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden|adjustResize">

            <!--android:windowSoftInputMode="stateHidden|adjustResize|adjustPan">-->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".activities.MainActivity" />
        </activity>
        <activity android:name=".activities.ImageViewerActivity" />

        <service
            android:name=".services.FirebaseChatService"
            android:enabled="true" />
        <service android:name=".services.MyFirebaseMessagingService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <receiver
            android:name=".receivers.ConnectivityReceiver"
            android:enabled="true">
            <intent-filter>
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE"
                    tools:ignore="BatteryLife" />
            </intent-filter>
        </receiver>

        <!-- https://developers.google.com/places/android-sdk/signup -->
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />

        <provider
            android:name=".utils.MyFileProvider"
            android:authorities="@string/authority"
            android:exported="false"
            android:grantUriPermissions="true"
            tools:replace="android:authorities">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

        <activity
            android:name=".activities.ContactViewerActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden|adjustResize" />
        <activity
            android:name=".activities.ChatDetailActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden|adjustResize" />
        <activity
            android:name=".activities.SignInActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoTitle"
            android:windowSoftInputMode="stateHidden|adjustResize" />
        <activity
            android:name=".activities.CallScreenActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.IncomingCallScreenActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".activities.SplashActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoTitle"
            android:windowSoftInputMode="stateHidden|adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <service
            android:name=".services.FetchMyUsersService"
            android:exported="false" />
        <service
            android:name=".services.SinchService"
            android:enabled="true"
            android:exported="false" />

        <activity
            android:name=".activities.ChooseSignInActivity"
            android:label="@string/title_activity_choose_sign_in"
            android:theme="@style/AppTheme" />

        <activity
            android:name=".activities.ContactActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden|adjustResize" />

        <activity
            android:name=".activities.PrivacyPolicyActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden|adjustResize" />

        <meta-data
            android:name="com.dreams.chat.status.glideProgressBar.OkHttpProgressGlideModule"
            android:value="GlideModule" />

        <activity
            android:name=".activities.StatusStoriesActivity"
            android:exported="true"
            android:screenOrientation="portrait"
            android:theme="@style/FullScreenVideoTheme" />

        <activity
            android:name=".activities.CallListActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden|adjustResize|adjustPan" />

    </application>

    </manifest>

这是非常详细的

代码语言:javascript
复制
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform timezago-1.1.8.aar (com.chootdev:timezago:1.1.8) to match attributes {artifactType=android-assets, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: C:\Users\JRAR\.gradle\caches\modules-2\files-2.1\com.chootdev\timezago\1.1.8\a988a24719cbe07115df73a045aa251630cdb10\timezago-1.1.8.aar.
         > Failed to transform 'C:\Users\JRAR\.gradle\caches\modules-2\files-2.1\com.chootdev\timezago\1.1.8\a988a24719cbe07115df73a045aa251630cdb10\timezago-1.1.8.aar' using Jetifier. Reason: ZipException, message: duplicate entry: AndroidManifest.xml. (Run with --stacktrace for more details.)
           Please file a bug at http://issuetracker.google.com/issues/new?component=460323.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-06-28 21:40:11

这个问题涉及到了allowbackup和appComponentFactory。我在这个question中找到了我的解决方案,如果日志和构建没有提供关于这个问题的足够详细信息,请检查合并清单,它会显示错误和建议。

打开应用程序清单 (AndroidManifest.xml)并单击Merged (在底部),请参见下面的图像。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62626916

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档