gpt4 book ai didi

android - list 合并错误 - 工具 :replace not working

转载 作者:可可西里 更新时间:2023-11-01 18:49:27 25 4
gpt4 key购买 nike

更新:

我什么都试过了。 Manifest合并工具有问题吗?

  • 工具:替换
  • 工具:删除
  • 工具:忽略
  • 工具:节点

无法解决以下错误:

D:\AndroidStudioProjects\Iknowthis2\app\src\main\AndroidManifest.xml:29:9-36
Error: Attribute application@allowBackup value=(false) from AndroidManifest.xml:29:9-36 is also present at [com.sackcentury:shinebutton:0.1.5] AndroidManifest.xml:12:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"'to <application> element at AndroidManifest.xml:27:5-73:19 to override.

D:\AndroidStudioProjects\Iknowthis2\app\src\main\AndroidManifest.xml:34:9-36
Error: Attribute application@supportsRtl value=(false) from AndroidManifest.xml:34:9-36 is also present at [com.sackcentury:shinebutton:0.1.5] AndroidManifest.xml:14:9-35 value=(true).
Suggestion: add 'tools:replace="android:supportsRtl"' to <application> element at AndroidManifest.xml:27:5-73:19 to override.

App 的原始 Manifest.xml - 在 tools:replace 之前

 <?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="xyz">

<!-- Include following permission if you load images from Internet -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Include following permission if you want to cache images on SD card -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:name=".ABC"
android:allowBackup="false"
android:fullBackupContent="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="false"
android:theme="@style/Theme"
tools:ignore="GoogleAppIndexingWarning,UnusedAttribute">


<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" />

<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />

<activity
android:name=".activity.SignInActivity"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

</manifest>

库的 Manifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sackcentury.shinebuttonlib">

<application android:allowBackup="true" android:label="@string/app_name"
android:supportsRtl="true">

</application>

</manifest>

最佳答案

就我而言,

从 list 文件中删除 tools:ignore 并添加 tools:replace="allowBackup,supportsRtl" 对我有用。

更新:

另一种解决方案看起来很有希望,但我从未尝试过。

 <application
xmlns:tools="http://schemas.android.com/tools" <-- added tools on application tag
android:name=".ABC"
android:allowBackup="false"
android:fullBackupContent="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="false"
android:theme="@style/Theme"
tools:replace="allowBackup,supportsRtl"
tools:ignore="GoogleAppIndexingWarning,UnusedAttribute">

关于android - list 合并错误 - 工具 :replace not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39285678/

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