Comments (18)
您好具体是什么问题?因为我现在开混淆测试没有问题
from mcimage.
java.io.IOException: Failed to read zip file 'D:\MyAndroidProject\app\build\intermediates\transforms\proguard\debug\jars\3\1f\main.jar'.
from mcimage.
就只有上面这些提示
from mcimage.
@jhonween 麻烦吧build.gradle 里的插件引用发一下~
from mcimage.
apply plugin: 'com.android.application'
apply plugin: 'McImage'
import org.aspectj.bridge.IMessage
import org.aspectj.bridge.MessageHandler
import org.aspectj.tools.ajc.Main
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "io.realm:realm-gradle-plugin:3.5.0"
classpath 'com.antfortune.freeline:gradle:0.8.7'
classpath 'org.aspectj:aspectjtools:1.8.9'
classpath 'org.aspectj:aspectjweaver:1.8.9'
classpath 'com.smallsoho.mobcase:McImage:0.0.4'
}
}
McImageConfig {
isCheck true //default true 是否进行图片大小超标的检查
isCompress true //default true 是否进行图片压缩
maxSize 110241024 //default 1MB 图片大小超标的标准大小
isWebpConvert false //default true 是否进行对图片的webp处理
isJPGConvert false //default true 是否对jpg进行webp处理
enableWhenDebug false //default true 是否在debug的时候启用插件
}
from mcimage.
插件集成的不对。
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "io.realm:realm-gradle-plugin:3.5.0"
classpath 'com.antfortune.freeline:gradle:0.8.7'
classpath 'org.aspectj:aspectjtools:1.8.9'
classpath 'org.aspectj:aspectjweaver:1.8.9'
classpath 'com.smallsoho.mobcase:McImage:0.0.4'
}
}
这一段放在根项目的build.gradle里面,不能跟application放一起
from mcimage.
如果解决了你的问题请关闭哈
from mcimage.
from mcimage.
这个build.gradle里面放了根目录也放了其它的配置东西
from mcimage.
apply plugin :"McImage"这句话写在各个module的build.gradle下,然后classplath 那个写在项目的build.gradle感觉你集成的不对。因为我这测试了几个app都是没问题的,而且插件是在混淆之前做处理。应该跟混淆无关
from mcimage.
但我在非混淆状态下是可以打包成功的,而且也压缩了大
from mcimage.
把aspectJ注释掉试试
from mcimage.
试了下 还是不能打包成功
from mcimage.
亲,要不你把源码下载下来debug下。我这实在是不能复现。。。。
from mcimage.
你好,我查了下,我的混淆文件加了
-keep class com.tencent.** { ;}
-dontwarn com.tencent.*
会打包错误,把这个去掉后,打包居然成功,但不知道为什么会这样,你们也看看到底是什么导致的,McImage适合在添加这串混淆代码导致冲突?
from mcimage.
插件的原理是换图,没有对之间的代码什么的做任何处理,所以应该不会影响这个。
from mcimage.
那我就不知道什么原因了
from mcimage.
要不我们加下qq聊下,我吧混淆文件发给你下
from mcimage.
Related Issues (20)
- McImageDebug HOT 2
- gradle:4.0.2 HOT 1
- 打包过程中出现Duplicate resources HOT 1
- raw文件夹图片没有被压缩 HOT 1
- drawable下的图片没有转成webp HOT 1
- 注意如果你有多个Module,请在每个Module的build.gradle文件中apply插件 HOT 3
- 集成报错Cannot cast object 'property(interface org.gradle.api.file.Directory
- mctools目录没有找到
- 建议增加目录白名单 HOT 1
- 这个插件跟gradle版本有强依赖吗? HOT 1
- 支持assets HOT 1
- mactools在新版本怎么找不到,只有在v0.0.1和V0.0.2能够找到
- 不支持asset 目录下的图片压缩呀? HOT 1
- isCheckPixels 导致IIOException HOT 3
- 能否支持增量压缩,每次全量耗时有点久 HOT 3
- 构建出错Could not determine the dependencies of task ':app:mergeDebugResources' HOT 1
- png转换成webp后,子模块的mergeReleaseResources任务报错:java.nio.file.NoSuchFileException。 HOT 6
- 编译报错
- Gradle 编译报错 Cannot invoke "java.awt.image.BufferedImage.getHeight()" because "sourceImg" is null
- Could not determine the dependencies of task ':app:mergeXXXDebugResources'. 编译失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcimage.