gpt4 book ai didi

android-studio - 原因 : duplicate entry: AndroidManifest. xml

转载 作者:行者123 更新时间:2023-12-02 13:41:46 29 4
gpt4 key购买 nike

我正在使用从 codecanyon.net 下载的项目,该项目无法通过 Gradle 构建并显示一条错误消息。我尝试查看具有类似问题的其他问题,但没有一个对我有用。请任何人帮助我解决这个问题

Cause: duplicate entry: AndroidManifest.xml

下面是 list 文件

    <?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>

这是异常的详细信息

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

最佳答案

问题出在 allowbackup 和 appComponentFactory 上。我在这个 question 中找到了解决方案的线索,如果日志和构建未提供有关该问题的足够详细信息,请检查合并的 list ,它会显示错误和建议。

打开应用程序 list (AndroidManifest.xml) 并点击Merged Manifest(在底部)见下图。

enter image description here

关于android-studio - 原因 : duplicate entry: AndroidManifest. xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62626916/

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