2016-06-16 6 views
0

proguardでパッケージを無視すると、そのパッケージに関する警告が表示されないのはなぜですか?Proguard:パッケージを無視しても警告が表示されない

背景:

大きなプロジェクトにproguardを適用しようとしています。私は私のアプリが有効になってProGuardのに実行されるまでProGuardのからこれらのパッケージを除外して、このアプローチを考えていた

Warning:net.fortuna.ical4j.model.CalendarFactory: can't find superclass or interface groovy.util.AbstractFactory 
Warning:net.fortuna.ical4j.model.CalendarFactory: can't find superclass or interface groovy.lang.GroovyObject 
Warning:net.fortuna.ical4j.model.ContentBuilder: can't find superclass or interface groovy.util.FactoryBuilderSupport 
Warning:net.fortuna.ical4j.model.ParameterListFactory: can't find superclass or interface groovy.util.AbstractFactory 
Warning:net.fortuna.ical4j.model.ParameterListFactory: can't find superclass or interface groovy.lang.GroovyObject 
Warning:net.fortuna.ical4j.model.component.AbstractComponentFactory: can't find superclass or interface groovy.util.AbstractFactory 
Warning:net.fortuna.ical4j.model.component.AbstractComponentFactory: can't find superclass or interface groovy.lang.GroovyObject 
Warning:net.fortuna.ical4j.model.component.XComponentFactory: can't find superclass or interface groovy.util.AbstractFactory 
Warning:net.fortuna.ical4j.model.component.XComponentFactory: can't find superclass or interface groovy.lang.GroovyObject 
Warning:net.fortuna.ical4j.model.parameter.AbstractParameterFactory: can't find superclass or interface groovy.util.AbstractFactory 
Warning:net.fortuna.ical4j.model.parameter.AbstractParameterFactory: can't find superclass or interface groovy.lang.GroovyObject 
Warning:net.fortuna.ical4j.model.property.AbstractPropertyFactory: can't find superclass or interface groovy.util.AbstractFactory 

:予想通り、私はこのような警告がたくさんあります。そして、パッケージごとに作業して、警告を無視するか、必要な部分だけを除外するかを判断できました。

私はProGuardのルールファイルへ

-keep class net.fortuna.ical4j.model.** { public protected private *; }

を追加し、パッケージを除外する方法のthis exampleを使用。しかし、以前と同じ警告が出ます。私はと組み合わせて-keepを使用することを示唆しているthisを見つけましたが、なぜプロガードがパッケージを無視して警告を一切防止しないのか分かりません。

答えて

0

クラスを保持しても、このクラスに関する警告が自動的に非表示になることはありません。構成や入力の不具合に問題がある可能性があるからです。

あなたを見てみると
-dontnote com.example.** 

:これは、このように非表示にすることができ、警告を隠すではなくノートます特定のパッケージ用の警告

-dontwarn com.example.** 

を非表示にするには

ical4jモデルクラスで使用されて参照されるグルーヴィーライブラリが欠落しているように見えます。

+0

proguardが削除したため、groovyライブラリが見つかりませんでしたか? ... – Michiyo

+0

Proguardはこのライブラリを削除していないため、縮小/難読化/最適化を行う前に設定と入力をチェックする際に警告が発行されます。 –

関連する問題