Manifest merger failed : Attribute [email protected] value=(@string/app_name)

使用android studio开发过程中,新建了A、B两个工程,其中B是库工程,工程A引用库工程B,编译过程中出现:Manifest merger failed : Attribute [email protected] value=(@string/app_name),从log看,导致该错误的原因是工程A和工程B中的AndroidManifest.xml文件中都使用了app name,合并manifest的过程出现了问题。

根据studio的suggestion:在A工程中的AndroidManifest.xml中加上以下两行:

xmlns:tools="http://schemas.android.com/tools"
tools:replace="android:label"
下面是A工程的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.xx.xx"
    android:versionCode="74"
    android:versionName="v3.4.1.1604071200" >  

   <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
    <application
        android:name="com.tc.cloud.McldApp"
        android:persistent="true"
        android:theme="@android:style/Theme.NoTitleBar"
        android:icon="@drawable/icon"
        android:allowBackup="false"
        android:supportsRtl="true"
        android:label="@string/mcs_app_name"
        tools:replace="android:label"  
B工程的AndroidManifest.xml片段:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="xx.xx.mylibrary">  

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

    </application>  

</manifest>  

原文地址:https://www.cnblogs.com/shijianit/p/8387134.html

时间: 2024-10-01 19:58:59

Manifest merger failed : Attribute [email protected] value=(@string/app_name)的相关文章

Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 10 declared in library

Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 10 declared in library [org.piwik.sdk:piwik-sdk:0.0.3] /Users/weichunsheng/Documents/android_app/app/build

解决『Manifest merger failed with multiple errors, see 』

Error:Execution failed for task ':app:processDebugManifest'.> Manifest merger failed with multiple errors, see logs 点这个就能看到详细的错误了

android开发里跳过的坑——android studio 错误Error:Execution failed for task &#39;:processDebugManifest&#39;. &gt; Manifest merger failed with multiple errors, see logs

使用AS在gradle里配置了多个定制版本,发现在编译版本切换时,会出现错误: Error:Execution failed for task ':processDebugManifest'.> Manifest merger failed with multiple errors, see logsInformation:Gradle tasks [:app:generatePhoneWulianDebugSources, :app:mockableAndroidJar, :app:prepa

android studio导入项目出错:Error:Execution failed for task &#39;:app:processDebugManifest&#39;. &gt; Manifest merger failed with multiple errors, see logs

android studio导入项目出错:Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple errors, see logs 解决方式:这个情况是有不同版本的 SDK 并不能合并,建议降低主程序target SDK版本. android studio导入项目出错:Error:Execution failed for task ':app:proce

解决Android Studio添加依赖时出现“Manifest merger failed

Manifest merger failed : uses-sdk:minSdkVersion 14 把module里的minSdkVersion改成与提示的错误一致就可以了.

【React Native】Error: Attribute [email&#160;protected] value=(false) from AndroidManifest.xml

解决办法:在Android Studio修改AndroidManifest.xml文件. 文件路径:android->app->src->debug->AndroidManifest.xml 在manifest标签中添加 xmlns:tools="http://schemas.android.com/tools" 在application标签中添加 tools:replace="android:allowBackup" android:all

解决Android Studio添加依赖时出现“Manifest merger failed”

分析错误提示, 主程序module清单文件中,application节点的android:icon属性引用了@mipmap/ic_launcher图片资源, 而依赖module的清单文件中,同样的android:icon属性却引用了@drawable/ic_launcher这个图片资源, 两个属性值产生冲突,导致合并清单文件失败. 虽然知道错误是什么,但是仍然不知道咋解决啊.其实英语没那么糟糕,细心点的话,就能看到错误提示中就给出了解决问题的建议. Suggestion: add 'tools:

关于Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 16 declared in lib

日志有些长,标题显示不完,截图如下: 有图可以知道,是因为在引入的libary里面的build.gradle文件里面的minSdkVersion不一致导致这个问题出现的.修改一致即可.这个问题是在compileSdkVersion 版本改成25后出现的,之前的没有发现.看来google在这方面越来越严了,以后这方面的代码应该保持一致,不仅仅是minSdkVersion,还有targetSdkVersion之类的版本

maven项目中使用redis集群报错: java.lang.NumberFormatException: For input string: &quot;[email&#160;protected]&quot;

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [redis.clients.jedis.JedisCluster]: Constructor threw exception; nested exception is java.lang.NumberFormatException: For input string: "[email protected]" at