2013-08-17

Proguard: can't find referenced method 'void setPluginsEnabled(boolean)' in class android.webkit.WebSettings

Androidでproguard使ってたら、こんなエラーがでた。
[2013-08-17 00:00:00 - MyApp] Proguard returned with error code 1. See console
[2013-08-17 00:00:00 - MyApp] Note: there were 3594 duplicate class definitions.
[2013-08-17 00:00:00 - MyApp] Warning: jp.co.cayto.appc.sdk.android.AppCWebActivity: can't find referenced method 'void setPluginsEnabled(boolean)' in class android.webkit.WebSettings
[2013-08-17 00:00:00 - MyApp]       You should check if you need to specify additional program jars.
[2013-08-17 00:00:00 - MyApp] Warning: there were 1 unresolved references to program class members.
[2013-08-17 00:00:00 - MyApp]          Your input classes appear to be inconsistent.
[2013-08-17 00:00:00 - MyApp]          You may need to recompile them and try again.
[2013-08-17 00:00:00 - MyApp]          Alternatively, you may have to specify the option
[2013-08-17 00:00:00 - MyApp]          '-dontskipnonpubliclibraryclassmembers'.
[2013-08-17 00:00:00 - MyApp] java.io.IOException: Please correct the above warnings first.
[2013-08-17 00:00:00 - MyApp]     at proguard.Initializer.execute(Initializer.java:321)
[2013-08-17 00:00:00 - MyApp]     at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-08-17 00:00:00 - MyApp]     at proguard.ProGuard.execute(ProGuard.java:86)
[2013-08-17 00:00:00 - MyApp]     at proguard.ProGuard.main(ProGuard.java:492)


proguardの設定ファイルに、
-keep public class android.webkit.WebSettings { *;}
って追加したら直ったみたい。
たぶん、古いバージョンのAndroidでも動くように、組み込んだjarでリフレクション使ってるからエラーになったのだろう。


0 件のコメント: