Java SecurityException: signer information does not match

后端 未结 18 2963
迷失自我
迷失自我 2020-11-22 12:56

I recompiled my classes as usual, and suddenly got the following error message. Why? How can I fix it?

java.lang.SecurityException: class \"Chinese_English_D         


        
18条回答
  •  时光取名叫无心
    2020-11-22 13:56

    A bit too old thread but since I was stuck for quite some time on this, here's the fix (hope it helps someone)

    My scenario:

    The package name is : com.abc.def. There are 2 jar files which contain classes from this package say jar1 and jar2 i.e. some classes are present in jar1 and others in jar2. These jar files are signed using the same keystore but at different times in the build (i.e. separately). That seems to result into different signature for the files in jar1 and jar2.

    I put all the files in jar1 and built (and signed) them all together. The problem goes away.

    PS: The package names and jar file names are only examples

提交回复
热议问题