我正在将当前项目的大型应用程序移动到Android Studio和Gradle中.我目前陷入以下问题:
Error:(87, 9) Execution failed for task ':App:processDebugManifest'.
> Manifest merger failed : Attribute application@label value=(@string/app_label) from AndroidManifest.xml:87:9
is also present at ANDROID_APPLICATION:Library:unspecified:9:18 value=(@string/app_name)
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:82:5 to override
Run Code Online (Sandbox Code Playgroud)
我尝试将以下属性添加到主AndroidManifest.xml文件中:
tools:replace="android:label, *App Name*"
tools:replace="android:label, @string/app_label"
tools:replace="android:label"
Run Code Online (Sandbox Code Playgroud)
这些属性定义都不起作用.我究竟做错了什么?
使用Google所谓的Material Design 2.0需要您添加
implementation 'com.google.android.material:material:1.0.0-rc01'
Run Code Online (Sandbox Code Playgroud)
在应用程序Gradle中也包括
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
Run Code Online (Sandbox Code Playgroud)
这显示了冲突
这是日志所说的内容
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0-rc02] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0-rc01] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-19:19 to override.
Run Code Online (Sandbox Code Playgroud)
即使在将其添加到Manifest之后,它也显示Manifest Merger因多次错误而失败
我尝试了一切.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.
Run Code Online (Sandbox Code Playgroud)
<?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 …Run Code Online (Sandbox Code Playgroud) 由于下载了最新的SDK并安装了Android Studio,因此我的项目无法构建。我收到以下消息:
清单合并失败,并出现多个错误
我的gradle应用:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.app.clupascu.oavm"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.github.chrisbanes:PhotoView:2.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
Run Code Online (Sandbox Code Playgroud)
我的清单
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.app.clupascu.oavm"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0" …Run Code Online (Sandbox Code Playgroud)我收到此错误
错误:AndroidManifest.xml:18:9-45 中的属性 application@label value=(flutter_bloc_pattern) 也存在于 [:DynamsoftBarcodeReader] AndroidManifest.xml:13:9-41 value=(@string/app_name)。
构建失败并出现错误
C:\Users\user\AndroidStudioProjects\Flutter Example\Flutter BLoC Pattern\android\app\src\main\AndroidManifest.xml:18:9-45 Error:
Attribute application@label value=(flutter_bloc_pattern) from AndroidManifest.xml:18:9-45
is also present at [:DynamsoftBarcodeReader] AndroidManifest.xml:13:9-41 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:16:5-39:19 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@label value=(flutter_bloc_pattern) from AndroidManifest.xml:18:9-45
is also present at [:DynamsoftBarcodeReader] AndroidManifest.xml:13:9-41 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:16:5-39:19 to override.
* …Run Code Online (Sandbox Code Playgroud) We are facing issue related manifest marge after changed in merged file error is:
"The prefix "tools" for attribute "tools:node" associated with an element type "uses-permission" is not bound."
Why this error occur and how to solve this ?
We are trying to add line in application tag for override but not solve ,searching more all gives answer to add line in top for tools added this but also not solve.
After replace manifest with old files but also giving …
我正在编译项目时面向下方使用
以下是错误日志
Error:Execution failed for task ':sampleproject:processDebugAndroidTestManifest'.
> java.lang.IllegalArgumentException: Multiple entries with same key: android:allowBackup=REPLACE and android1:allowBackup=REPLACE
Run Code Online (Sandbox Code Playgroud)
AndroidManifest.xml中
<?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.sample.mini" >
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-sdk tools:overrideLibrary="com.sample.toolkit.payment"/>
<application
android:allowBackup="false"
android:icon="@mipmap/icn_app"
android:label="@string/app_name"
android:largeHeap="true"
android:supportsRtl="false"
android:theme="@style/MaterialTheme"
tools:replace="android:label, theme, allowBackup, android:icon,android:supportsRtl">
<activity
android:name="com.sample.SwiftActivity"
android:screenOrientation="portrait"
android:theme="@style/MaterialTheme" />
<activity
android:name="com.activities.TermsAndConditionActivity"
android:screenOrientation="portrait"
android:theme="@style/MaterialTheme" />
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)