Coder Social home page Coder Social logo

混淆问题 about mcimage HOT 18 CLOSED

smallsohosolo avatar smallsohosolo commented on May 24, 2024
混淆问题

from mcimage.

Comments (18)

smallSohoSolo avatar smallSohoSolo commented on May 24, 2024

您好具体是什么问题?因为我现在开混淆测试没有问题

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

java.io.IOException: Failed to read zip file 'D:\MyAndroidProject\app\build\intermediates\transforms\proguard\debug\jars\3\1f\main.jar'.

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

就只有上面这些提示

from mcimage.

EvilsoulM avatar EvilsoulM commented on May 24, 2024

@jhonween 麻烦吧build.gradle 里的插件引用发一下~

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

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.

smallSohoSolo avatar smallSohoSolo commented on May 24, 2024

插件集成的不对。
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.

smallSohoSolo avatar smallSohoSolo commented on May 24, 2024

如果解决了你的问题请关闭哈

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

我们的项目目录就是这样的
1

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

这个build.gradle里面放了根目录也放了其它的配置东西

from mcimage.

smallSohoSolo avatar smallSohoSolo commented on May 24, 2024

apply plugin :"McImage"这句话写在各个module的build.gradle下,然后classplath 那个写在项目的build.gradle感觉你集成的不对。因为我这测试了几个app都是没问题的,而且插件是在混淆之前做处理。应该跟混淆无关

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

但我在非混淆状态下是可以打包成功的,而且也压缩了大

from mcimage.

smallSohoSolo avatar smallSohoSolo commented on May 24, 2024

把aspectJ注释掉试试

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

试了下 还是不能打包成功

from mcimage.

smallSohoSolo avatar smallSohoSolo commented on May 24, 2024

亲,要不你把源码下载下来debug下。我这实在是不能复现。。。。

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

你好,我查了下,我的混淆文件加了
-keep class com.tencent.** { ;}
-dontwarn com.tencent.
*
会打包错误,把这个去掉后,打包居然成功,但不知道为什么会这样,你们也看看到底是什么导致的,McImage适合在添加这串混淆代码导致冲突?

from mcimage.

smallSohoSolo avatar smallSohoSolo commented on May 24, 2024

插件的原理是换图,没有对之间的代码什么的做任何处理,所以应该不会影响这个。

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

那我就不知道什么原因了

from mcimage.

jhonween avatar jhonween commented on May 24, 2024

要不我们加下qq聊下,我吧混淆文件发给你下

from mcimage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.