我的Android进阶之旅------>解决Error: specified for property 'mergedManifest' does not exist.
2024-09-04 10:33:41
错误描述
刚运行从Github上面下载而来的代码时,爆了如下所示的bug,错误描述如下所示:
Error:A problem was found with the configuration of task ':app:generateDebugInstantRunAppInfo'.
> File 'F:\Multi-Thread Download\MultiThreadDownload\app\build\intermediates\bundles\debug\instant-run\AndroidManifest.xml' specified for property 'mergedManifest' does not exist.
如下图所示:
解决方法
在stackoverflow网站上面搜索到了相关方面的解决方法,地址如下:
http://stackoverflow.com/questions/24536065/manifest-mergeing-android-studio-0-8-1-upgrade-build-error-property-manifest
按照上面的修改,修改之前的gradle文件内容如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.aspsine.multithreaddownload"
minSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
disable 'InvalidPackage'
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile project(':library')
}
然后增加上面所示的几行代码:
defaultConfig {
manifestPlaceholders = [ activityLabel:"defaultName"]
}
productFlavors {
free {
}
pro {
manifestPlaceholders = [ activityLabel:"proName" ]
}
}
增加后的部分截图如下所示:
完整的gradle文件内容如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.aspsine.multithreaddownload"
minSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
manifestPlaceholders = [ activityLabel:"defaultName"]
}
productFlavors {
free {
}
pro {
manifestPlaceholders = [ activityLabel:"proName" ]
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
disable 'InvalidPackage'
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile project(':library')
}
修改完成后,同步一下代码,重新编译即可成功。如下图所示:
作者:欧阳鹏 欢迎转载,与人分享是进步的源泉!
转载请保留原文地址:http://blog.csdn.net/ouyang_peng
最新文章
- 从 Everything 到 Listary,自 Launch 归 Wox
- Ncut源码编译错误的解决方法
- Linux中的历史命令
- CSS颜色模式转换器的实现
- BZOJ 3907: 网格
- outlook经常无故崩溃解决办法
- HDOJ 1428 漫步校园
- 2016021902 - linux解压缩命令
- JSP错题纠错
- stream_context_create
- idea下使用autowire注解注入对象,结果初始化不到类
- 基于FPGA的腐蚀膨胀算法实现
- Axios源码深度剖析 - 替代$.ajax,成为xhr的新霸主
- C# 通俗说 委托(和事件)
- LeetCode20:validParentheses
- 微信小程序生成指定页面小程序码海报图片分享思路总结
- 从github clone文件: Failed to receive SOCKS4 connect request ack.
- 算法:最短路径之弗洛伊德(Floyd)算法
- 爬虫--Scrapy框架课程介绍
- How to Pronounce Numbers 11 – 19
热门文章
- SQL 数据库分页语句
- django中使用POST方法报错 URL via POST, but the URL doesn't end in a slash
- 用Vue.js递归组件构建一个可折叠的树形菜单
- shiro添加注解@RequiresPermissions无效
- SVN 提交出错:Attempted to lock an already-locked dir
- IntelliJ IDEA JDK配置
- 第二百二十三节,jQuery EasyUI,ComboBox(下拉列表框)组件
- VUE:使用vue-cli脚手架无法安装npm install axios 的巨坑
- 解决 Ubuntu 13.04 无法调节屏幕亮度的问题
- 用MathType编辑带点星号的流程