android gradle resvalue,在插件中Gradle使用resValue在资源文件中添加信息,导致realease版本编译失败...
问题详细描述 Detailed description of the problem
由于在插件中无法读取自身的meta-data,因此在资源文件中做一些分渠道分发的内容填充。但是使用resValue时,release编译失败,debug没问题。但是此时不clean,再次build即可成功。
复现问题步骤 Steps to reproduce the problem
app.gradle文件大致内容
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 27
signingConfigs {
releaseConfig {
keyAlias 'ApkReleaseSign'
keyPassword 'android_ApkReleaseSign'
storeFile file('signing.data')
storePassword 'abcdefg'
}
}
defaultConfig {
applicationId "com.xxxxxxxx"
minSdkVersion 19
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.releaseConfig
}
}
flavorDimensions 'abi', 'channel'
productFlavors {
local {
dimension "channel"
// 存在下面这行会导致release编译失败
resValue "string", "message", "Hello World"
manifestPlaceholders = [pluginName: 'PN_Webview']
}
x86 {
dimension "abi"
ndk {
abiFilters "x86", "x86_64"
}
}
arm {
dimension "abi"
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "armeabi"
}
}
}
}
apply plugin: 'replugin-plugin-gradle'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':PublicModule')
implementation 'com.qihoo360.replugin:replugin-plugin-lib:2.2.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
repositories {
mavenCentral()
}
尝试过clean后,再次build。问题依旧。debug版本均可以正常编译,反编译后确认资源文件填充正常。
编译失败后的log
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWith___ReClass___ForArmLocalRelease'.
> E:\projects\UnitedPlatform\PluginWebBrowser\app\build\intermediates\exploded-aar\61879379f28a6bd1cde7a9db2bbd3735e76489d3\class does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 9m 19s
其它重要信息 Other important information
rePlugin-plugin-lib/gradle Version: 2.2.1
JDK: 1.8
Gradle: 3.0.1
android gradle resvalue,在插件中Gradle使用resValue在资源文件中添加信息,导致realease版本编译失败...相关推荐
- c#中中读取嵌入和使用资源文件的方法
Dotnet中嵌入资源(位图.图标或光标等)有两种方式,一是直接把资源文件加入到项目,作为嵌入资源,在代码中通过Assembly的GetManifestResourceStream方法获取资源的Str ...
- android 颜色资源文件,android中colors.xml颜色设置资源文件的方法
1. 打开res目录下的values文件夹,双击打开colors.xml文件进行编辑 上代码 #008577 #00574B #D81B60 #ff0000 #0000ff 2. 在res目录下的la ...
- android中的BitMap(二)从网络和资源文件中获得一个BitMap
//取得网络上图片资源的路径 String urlstring="http://img.wallba.com/Public/Upload/Image/qichebizi/ asidunm ...
- android 中color目录,android中colors.xml颜色设置资源文件的方法
1. 打开res目录下的values文件夹,双击打开colors.xml文件进行编辑 上代码 #008577 #00574B #D81B60 #ff0000 #0000ff 2. 在res目录下的la ...
- android获取drawable路径,从资源文件中获取drawable
丑话说前头,本文转自: http://stackoverflow.com/questions/29041027/android-getresources-getdrawable-deprecated- ...
- 【Android游戏开发二十七】讲解游戏开发与项目下的hdpi 、mdpi与ldpi资源文件夹以及游戏高清版本的设置...
今天一个开发者问到我为什么游戏开发要删除项目下的hdpi.mdpi和ldpi文件夹:下面详细给大家解答一下: 首先童鞋们如果看过我写的<[Android游戏开发二十一]Android os设备谎 ...
- 文件_ _android从资源文件中读取文件流并显示的方法
======== 1 android从资源文件中读取文件流并显示的方法. 在android中,假如有的文本文件,比如TXT放在raw下,要直接读取出来,放到屏幕中显示,可以这样: private ...
- 将资源文件中的数据写回磁盘
/// <summary> /// 将资源文件中的System.Data.SQLite.dll写回磁盘 /// </summary> public static void Wr ...
- 将 a.txt 文件中的单词与 b.txt 文件中的单词交替合并到 c.txt 文件 中
package again;import java.io.*;/* 1.编写一个程序,将 a.txt 文件中的单词与 b.txt 文件中的单词交替合并到 c.txt 文件 中,a.txt 文件中的单词 ...
最新文章
- python(matplotlib)画柱状图(1)
- 软件项目管理 用户测试,1对软件研发过程中用户需求研发设计项目测试交付实施测试等流程监督管理.doc...
- linux usr g 空间不足,centos 磁盘空间不足
- python查看文件的编码格式
- nfs文件共享+netstat相关 记录
- 为CEDIT添加有颜色的边框
- vaps 程序直接通信
- 【ES6(2015)】解构赋值Desctructuring
- (138)System Verilog覆盖率目标设置
- EJB3.0学习笔记---多接口的时,实现类处理方法:
- Allegro封装制作
- python sorted怎么排序_Python sorted排序方法怎么用
- 【python】cannot import name ‘Imputer‘ from ‘sklearn.preprocessing‘ 解决办法
- web项目no such method exception
- 线性变换到底是什么以及与矩阵之间的联系
- python写一个飞花令程序
- split-horizon产生的路由欺骗
- KISSY基础篇乄KISSY之DOM(1)
- labelcommand打印条码_VB应用程序中打印条形码的方法
- SF图像滤镜/美颜/美妆算法详解与实战