0

Proguard Obfuscation が jar からリソースを見つけられなかった後、次のエラーが発生します

Caused by: java.lang.NoClassDefFoundError: Could not initialize class mypackege.MyClass
4

2 に答える 2

1

リンクで見つけることができます

<adaptresourcefilenames filter = "file_filter" />
Rename the specified resource files, based on the obfuscated names of the corresponding class files.

<adaptresourcefilecontents filter = "file_filter" />
Update the contents of the specified resource files, based on the obfuscated names of the processed classes.

于 2012-09-05T15:40:56.380 に答える
0

現時点では、jarの外部から呼び出されるため、ofusquenになりたくないofuscasクラスとメソッドを定義する必要があります。

アリの例:

<taskdef resource="proguard/ant/task.properties"
         classpath="/usr/local/java/proguard/lib/proguard.jar" />
<proguard>
  -libraryjars ${java.home}/lib/rt.jar
  -injars      in.jar
  -outjars     out.jar

  -keepclasseswithmembers public class * {
      public static void main(java.lang.String[]);
  }
</proguard>

詳細:http://proguard.sourceforge.net/index.html#manual/ant.html

よろしく、

于 2012-09-05T15:32:29.337 に答える