问题详细描述 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版本编译失败...相关推荐

  1. c#中中读取嵌入和使用资源文件的方法

    Dotnet中嵌入资源(位图.图标或光标等)有两种方式,一是直接把资源文件加入到项目,作为嵌入资源,在代码中通过Assembly的GetManifestResourceStream方法获取资源的Str ...

  2. android 颜色资源文件,android中colors.xml颜色设置资源文件的方法

    1. 打开res目录下的values文件夹,双击打开colors.xml文件进行编辑 上代码 #008577 #00574B #D81B60 #ff0000 #0000ff 2. 在res目录下的la ...

  3. android中的BitMap(二)从网络和资源文件中获得一个BitMap

      //取得网络上图片资源的路径 String urlstring="http://img.wallba.com/Public/Upload/Image/qichebizi/ asidunm ...

  4. android 中color目录,android中colors.xml颜色设置资源文件的方法

    1. 打开res目录下的values文件夹,双击打开colors.xml文件进行编辑 上代码 #008577 #00574B #D81B60 #ff0000 #0000ff 2. 在res目录下的la ...

  5. android获取drawable路径,从资源文件中获取drawable

    丑话说前头,本文转自: http://stackoverflow.com/questions/29041027/android-getresources-getdrawable-deprecated- ...

  6. 【Android游戏开发二十七】讲解游戏开发与项目下的hdpi 、mdpi与ldpi资源文件夹以及游戏高清版本的设置...

    今天一个开发者问到我为什么游戏开发要删除项目下的hdpi.mdpi和ldpi文件夹:下面详细给大家解答一下: 首先童鞋们如果看过我写的<[Android游戏开发二十一]Android os设备谎 ...

  7. 文件_ _android从资源文件中读取文件流并显示的方法

    ======== 1   android从资源文件中读取文件流并显示的方法. 在android中,假如有的文本文件,比如TXT放在raw下,要直接读取出来,放到屏幕中显示,可以这样: private ...

  8. 将资源文件中的数据写回磁盘

    /// <summary> /// 将资源文件中的System.Data.SQLite.dll写回磁盘 /// </summary> public static void Wr ...

  9. 将 a.txt 文件中的单词与 b.txt 文件中的单词交替合并到 c.txt 文件 中

    package again;import java.io.*;/* 1.编写一个程序,将 a.txt 文件中的单词与 b.txt 文件中的单词交替合并到 c.txt 文件 中,a.txt 文件中的单词 ...

最新文章

  1. python(matplotlib)画柱状图(1)
  2. 软件项目管理 用户测试,1对软件研发过程中用户需求研发设计项目测试交付实施测试等流程监督管理.doc...
  3. linux usr g 空间不足,centos 磁盘空间不足
  4. python查看文件的编码格式
  5. nfs文件共享+netstat相关 记录
  6. 为CEDIT添加有颜色的边框
  7. vaps 程序直接通信
  8. 【ES6(2015)】解构赋值Desctructuring
  9. (138)System Verilog覆盖率目标设置
  10. EJB3.0学习笔记---多接口的时,实现类处理方法:
  11. Allegro封装制作
  12. python sorted怎么排序_Python sorted排序方法怎么用
  13. 【python】cannot import name ‘Imputer‘ from ‘sklearn.preprocessing‘ 解决办法
  14. web项目no such method exception
  15. 线性变换到底是什么以及与矩阵之间的联系
  16. python写一个飞花令程序
  17. split-horizon产生的路由欺骗
  18. KISSY基础篇乄KISSY之DOM(1)
  19. labelcommand打印条码_VB应用程序中打印条形码的方法
  20. SF图像滤镜/美颜/美妆算法详解与实战

热门文章

  1. 埃森哲被勒索了,你的数据安全吗?
  2. 算法设计与分析-11076 浮点数的分数表达
  3. centos minimal 不能联网配置
  4. 很多深度学习工具中卷积操作其实都是互相关操作
  5. 【图像分类】2020-ViT ICLR
  6. sourceInsight彻底重装
  7. python爬虫登陆教程_(python模拟登陆教程)python爬虫模拟登录是什么意思
  8. ROS下UVC免驱高速摄像头图像读取以及利用image_transport进行图像传递
  9. OSSIM开源安全信息管理系统(九)
  10. 中美纺织品达成暂时性协议