Shell App SDK とは
This page is not available in English.
Please select another language.
ProGuard の設定
ProGuard を利用する場合、以下の設定を proguard-project.txt に追記してください。
Shell App SDK 1.7.0 以降の場合の proguard-project.txt 追加内容
# for Google Play Services SDK -keep class * extends java.util.ListResourceBundle { protected Object[][] getContents(); } -keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { public static final *** NULL; } -keepnames @com .google.android.gms.common.annotation.KeepName class * -keepclassmembernames class * { @com .google.android.gms.common.annotation.KeepName *; } -keepnames class * implements android.os.Parcelable { public static final ** CREATOR; } -dontwarn com.google.android.gms.cast.** # for ShellApp SDK -keep class com.mobage.android.shellappsdk.** { *; } -keep class android.support.v4.** { *; } -keep class com.android.vending.billing.** { *; } -keep class jp.dena.nbpfshellappsdk.http.util.SerializableCookie { *; } -keep class com.firebase.jobdispatcher.** { *; } |
![]() | Shell App SDK 1.7.0 から下記の項目が追加されています。
|
Shell App SDK 1.7.0 未満の proguard-project.txt 追加内容
# for Google Play Services SDK -keep class * extends java.util.ListResourceBundle { protected Object[][] getContents(); } -keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { public static final *** NULL; } -keepnames @com .google.android.gms.common.annotation.KeepName class * -keepclassmembernames class * { @com .google.android.gms.common.annotation.KeepName *; } -keepnames class * implements android.os.Parcelable { public static final ** CREATOR; } # for ShellApp SDK -keep class com.mobage.android.shellappsdk.** { *; } -keep class android.support.v4.** { *; } -keep class com.android.vending.billing.** { *; } -keep class jp.dena.nbpfshellappsdk.http.util.SerializableCookie { *; }
|
また、project.properties の以下の設定を有効にするため、コメントアウトを外してください。
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt |
ただし、Shell App SDK において、ProGuard を設定すると、Warning が出てコンパイルすることができません。
以下のいずれかを実施して Warning が出るのを回避してください。
- アプリの compileSdkVersion を "21" または "22" に変更する。
- proguard-project.txt に下記を追加する
-dontwarn com.mobage.android.shellappsdk.webkit.JSBridgingWebView
更新履歴
- 2018/11/30
- Shell App SDK 1.7.0 での proguard-project.txt 内容を追記
- 2015/11/18
- Warning が出てコンパイルできない問題について追記
- 2015/07/06
- ProGuard の除外設定に jp.dena.nbpfshellappsdk.http.util.SerializableCookie を追加。
- 2015/02/05
- 新規作成