Hi, debug compile and build work good but release compile error.
cocos v3.6
Please help
Last login: Wed Aug 5 15:36:31 on ttys001
ZeroCool-MacBook-Pro:colorfulsolitaire zero-cool$ cocos compile -p android -m release
…
…
[proguard] Note: com.sdkbox.plugin.SDKBox accesses a field ‘PluginType’ dynamically
[proguard] Maybe this is program field ‘com.sdkbox.plugin.IPluginGoogleAnalytics { int PluginType; }’
[proguard] Maybe this is program field ‘com.sdkbox.plugin.InterfaceAds { int PluginType; }’
[proguard] Note: org.cocos2dx.lib.Cocos2dxWebView accesses a method ‘removeJavascriptInterface(java.lang.String)’ dynamically
[proguard] Maybe this is library method ‘android.webkit.WebView { void removeJavascriptInterface(java.lang.String); }’
[proguard] Note: the configuration refers to the unknown class ‘Object’
[proguard] Maybe you meant the fully qualified name ‘java.lang.Object’?
[proguard] Note: there were 1 references to unknown classes.
[proguard] You should check your configuration for typos.
[proguard] Note: there were 3 unresolved dynamic references to classes or interfaces.
[proguard] You should check if you need to specify additional program jars.
[proguard] Note: there were 8 accesses to class members by means of introspection.
[proguard] You should consider explicitly keeping the mentioned class members
[proguard] (using ‘-keep’ or ‘-keepclassmembers’).
[proguard] Warning: there were 66 unresolved references to classes or interfaces.
[proguard] You may need to specify additional library jars (using ‘-libraryjars’).
[proguard] Warning: there were 16 unresolved references to program class members.
[proguard] Your input classes appear to be inconsistent.
[proguard] You may need to recompile them and try again.
[proguard] Alternatively, you may have to specify the option
[proguard] ‘-dontskipnonpubliclibraryclassmembers’.
BUILD FAILED
/Users/zero-cool/Development/Android-WorkSpace/android-sdks/tools/ant/build.xml:871: Please correct the above warnings first.
May be this problem in Proguard
But how to solve it?
[2015-08-05 17:42:49 - Colorfulsolitaire] Proguard returned with error code 1. See console
[2015-08-05 17:42:49 - Colorfulsolitaire] Note: there were 628 duplicate class definitions.
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService$1: can’t find superclass or interface android.support.v7.media.MediaRouter$Callback
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.ads.formats.NativeAdView: can’t find referenced method ‘FrameLayout(android.content.Context,android.util.AttributeSet,int,int)’ in class android.widget.FrameLayout
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouteSelector
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouteSelector$Builder
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouter
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouter$Callback
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouter$RouteInfo
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouteSelector$Builder
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouteSelector$Builder
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouteSelector$Builder
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouter
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: com.google.android.gms.cast.CastRemoteDisplayLocalService: can’t find referenced class android.support.v7.media.MediaRouter
…
…
[2015-08-05 17:42:49 - Colorfulsolitaire] You should check if you need to specify additional program jars.
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: there were 29 unresolved references to classes or interfaces.
[2015-08-05 17:42:49 - Colorfulsolitaire] You may need to specify additional library jars (using ‘-libraryjars’).
[2015-08-05 17:42:49 - Colorfulsolitaire] Warning: there were 6 unresolved references to program class members.
[2015-08-05 17:42:49 - Colorfulsolitaire] Your input classes appear to be inconsistent.
[2015-08-05 17:42:49 - Colorfulsolitaire] You may need to recompile them and try again.
[2015-08-05 17:42:49 - Colorfulsolitaire] Alternatively, you may have to specify the option
[2015-08-05 17:42:49 - Colorfulsolitaire] ‘-dontskipnonpubliclibraryclassmembers’.
[2015-08-05 17:42:49 - Colorfulsolitaire] Error: Please correct the above warnings first.
# https://developers.google.com/android/guides/setup#Proguard
#-libraryjars libs/android-support-v4.jar
# Setting Up Google Play Services
-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;
}
# Setting Up Google Play Services __END__
# https://developer.android.com/reference/android/content/pm/PackageInstaller.html
# http://stackoverflow.com/questions/29715460/google-play-services-v23-proguard-configuration
-keep public class android.content.Context
-dontwarn com.google.android.gms.**
-dontwarn android.support.v4.**
-keep class java.lang.reflect.**
BUILD SUCCESSFUL with some warning:
[proguard] Note: com.google.android.gms.maps.internal.zzx: can't find dynamically referenced class com.google.android.gms.maps.internal.CreatorImplGmm6
[proguard] Note: com.google.android.gms.maps.internal.zzx: can't find dynamically referenced class com.google.android.gms.maps.internal.CreatorImpl
[proguard] Note: com.google.android.gms.internal.zzfc accesses a declared method 'asInterface(android.os.IBinder)' dynamically
[proguard] Note: com.sdkbox.plugin.SDKBox accesses a field 'PluginType' dynamically
[proguard] Maybe this is program field 'com.sdkbox.plugin.IPluginGoogleAnalytics { int PluginType; }'
[proguard] Maybe this is program field 'com.sdkbox.plugin.InterfaceAds { int PluginType; }'
[proguard] Note: org.cocos2dx.lib.Cocos2dxWebView accesses a method 'removeJavascriptInterface(java.lang.String)' dynamically
[proguard] Maybe this is library method 'android.webkit.WebView { void removeJavascriptInterface(java.lang.String); }'
[proguard] Note: the configuration refers to the unknown class 'Object'
[proguard] Maybe you meant the fully qualified name 'java.lang.Object'?
[proguard] Note: there were 1 references to unknown classes.
[proguard] You should check your configuration for typos.
[proguard] Note: there were 2 unresolved dynamic references to classes or interfaces.
[proguard] You should check if you need to specify additional program jars.
[proguard] Note: there were 4 accesses to class members by means of introspection.
[proguard] You should consider explicitly keeping the mentioned class members
[proguard] (using '-keep' or '-keepclassmembers').