我的APK在調試版本中發佈變體並安裝在我的測試設備上,按預期工作,但當涉及到APK的Playstore版本時,它會達到ProGuard部分,抱怨科爾多瓦XWalk插件。安卓apk版本與編程失敗
> ProGuard, version 5.2.1
Reading input...
Reading program jar [/home/Evil_Wizard/Projects/Taxicode/App/Android/build/intermediates/exploded-aar/org.xwalk/xwalk_core_library/14.43.343.25/jars/classes.jar] (filtered)
Reading program jar [/home/Evil_Wizard/Projects/Taxicode/App/Android/build/intermediates/exploded-aar/Android/CordovaLib/unspecified/release/jars/classes.jar] (filtered)
Reading program directory [/home/Evil_Wizard/Projects/Taxicode/App/Android/build/intermediates/classes/armv7/release] (filtered)
Reading library jar [/home/Evil_Wizard/Android/Sdk/platforms/android-21/android.jar]
Initializing...
Warning: org.apache.cordova.CordovaInterfaceImpl: can't find referenced method 'void requestPermissions(java.lang.String[],int)' in library class android.app.Activity
Warning: org.apache.cordova.CordovaInterfaceImpl: can't find referenced method 'int checkSelfPermission(java.lang.String)' in library class android.app.Activity
Note: org.chromium.base.library_loader.Linker calls '(org.chromium.base.library_loader.Linker$TestRunner)Class.forName(variable).newInstance()'
Note: org.chromium.net.DefaultAndroidKeyStore: can't find dynamically referenced class org.apache.harmony.xnet.provider.jsse.OpenSSLRSAPrivateKey
Note: org.chromium.net.DefaultAndroidKeyStore: can't find dynamically referenced class org.apache.harmony.xnet.provider.jsse.OpenSSLEngine
Note: org.chromium.media.MediaPlayerBridge accesses a field 'PAUSE_AVAILABLE' dynamically
Note: org.chromium.media.MediaPlayerBridge accesses a field 'SEEK_FORWARD_AVAILABLE' dynamically
Note: org.chromium.media.MediaPlayerBridge accesses a field 'SEEK_BACKWARD_AVAILABLE' dynamically
Note: the configuration keeps the entry point 'org.chromium.base.library_loader.Linker { boolean nativeLoadLibrary(java.lang.String,long,org.chromium.base.library_loader.Linker$LibInfo); }', but not the descriptor class 'org.chromium.base.library_loader.Linker$LibInfo'
Note: the configuration keeps the entry point 'org.chromium.base.library_loader.Linker { boolean nativeLoadLibraryInZipFile(java.lang.String,java.lang.String,long,org.chromium.base.library_loader.Linker$LibInfo); }', but not the descriptor class 'org.chromium.base.library_loader.Linker$LibInfo'
Note: the configuration keeps the entry point 'org.chromium.base.library_loader.Linker { boolean nativeCreateSharedRelro(java.lang.String,long,org.chromium.base.library_loader.Linker$LibInfo); }', but not the descriptor class 'org.chromium.base.library_loader.Linker$LibInfo'
Note: the configuration keeps the entry point 'org.chromium.base.library_loader.Linker { boolean nativeUseSharedRelro(java.lang.String,org.chromium.base.library_loader.Linker$LibInfo); }', but not the descriptor class 'org.chromium.base.library_loader.Linker$LibInfo'
Note: the configuration keeps the entry point 'org.chromium.content.browser.ContentViewCore { long nativeInit(org.chromium.content_public.browser.WebContents,org.chromium.ui.base.ViewAndroid,long,java.util.HashSet); }', but not the descriptor class 'org.chromium.content_public.browser.WebContents'
Note: the configuration keeps the entry point 'org.chromium.content.browser.ContentViewCore { long nativeInit(org.chromium.content_public.browser.WebContents,org.chromium.ui.base.ViewAndroid,long,java.util.HashSet); }', but not the descriptor class 'org.chromium.ui.base.ViewAndroid'
Note: the configuration keeps the entry point 'org.chromium.content.browser.ContentViewCore { org.chromium.content.browser.ContentViewCore nativeFromWebContentsAndroid(org.chromium.content_public.browser.WebContents); }', but not the descriptor class 'org.chromium.content_public.browser.WebContents'
Note: the configuration keeps the entry point 'org.chromium.content.browser.MediaDrmCredentialManager { void nativeResetCredentials(org.chromium.content.browser.MediaDrmCredentialManager$MediaDrmCredentialManagerCallback); }', but not the descriptor class 'org.chromium.content.browser.MediaDrmCredentialManager$MediaDrmCredentialManagerCallback'
Note: the configuration keeps the entry point 'org.chromium.content.browser.ServiceRegistry { void nativeAddService(long,org.chromium.mojo.bindings.Interface$Manager,org.chromium.content.browser.ServiceRegistry$ImplementationFactory,java.lang.String); }', but not the descriptor class 'org.chromium.mojo.bindings.Interface$Manager'
Note: the configuration keeps the entry point 'org.chromium.content.browser.ServiceRegistry { void nativeAddService(long,org.chromium.mojo.bindings.Interface$Manager,org.chromium.content.browser.ServiceRegistry$ImplementationFactory,java.lang.String); }', but not the descriptor class 'org.chromium.content.browser.ServiceRegistry$ImplementationFactory'
Note: the configuration keeps the entry point 'org.chromium.content.browser.framehost.NavigationControllerImpl { void nativeGetDirectedNavigationHistory(long,org.chromium.content_public.browser.NavigationHistory,boolean,int); }', but not the descriptor class 'org.chromium.content_public.browser.NavigationHistory'
Note: the configuration keeps the entry point 'org.chromium.content.browser.webcontents.WebContentsImpl { void nativeEvaluateJavaScript(long,java.lang.String,org.chromium.content_public.browser.JavaScriptCallback); }', but not the descriptor class 'org.chromium.content_public.browser.JavaScriptCallback'
Note: the configuration keeps the entry point 'org.chromium.mojo.system.impl.CoreImpl { org.chromium.mojo.system.impl.CoreImpl$AsyncWaiterCancellableImpl nativeAsyncWait(int,int,long,org.chromium.mojo.system.AsyncWaiter$Callback); }', but not the descriptor class 'org.chromium.mojo.system.AsyncWaiter$Callback'
Note: the configuration keeps the entry point 'org.xwalk.core.internal.XWalkContent { void nativeSetJavaPeers(long,org.xwalk.core.internal.XWalkContent,org.xwalk.core.internal.XWalkWebContentsDelegateAdapter,org.xwalk.core.internal.XWalkContentsClientBridge,org.xwalk.core.internal.XWalkContentsIoThreadClient,org.chromium.components.navigation_interception.InterceptNavigationDelegate); }', but not the descriptor class 'org.xwalk.core.internal.XWalkWebContentsDelegateAdapter'
Note: the configuration keeps the entry point 'org.xwalk.core.internal.XWalkContent { void nativeSetJavaPeers(long,org.xwalk.core.internal.XWalkContent,org.xwalk.core.internal.XWalkWebContentsDelegateAdapter,org.xwalk.core.internal.XWalkContentsClientBridge,org.xwalk.core.internal.XWalkContentsIoThreadClient,org.chromium.components.navigation_interception.InterceptNavigationDelegate); }', but not the descriptor class 'org.xwalk.core.internal.XWalkContentsIoThreadClient'
Note: the configuration keeps the entry point 'org.xwalk.core.internal.XWalkContent { void nativeSetJavaPeers(long,org.xwalk.core.internal.XWalkContent,org.xwalk.core.internal.XWalkWebContentsDelegateAdapter,org.xwalk.core.internal.XWalkContentsClientBridge,org.xwalk.core.internal.XWalkContentsIoThreadClient,org.chromium.components.navigation_interception.InterceptNavigationDelegate); }', but not the descriptor class 'org.chromium.components.navigation_interception.InterceptNavigationDelegate'
Note: the configuration keeps the entry point 'org.xwalk.core.internal.XWalkSettings { long nativeInit(org.chromium.content_public.browser.WebContents); }', but not the descriptor class 'org.chromium.content_public.browser.WebContents'
Note: there were 17 unkept descriptor classes in kept class members.
You should consider explicitly keeping the mentioned classes
(using '-keep').
>Note: there were 2 unresolved dynamic references to classes or interfaces.
You should check if you need to specify additional program jars.
>Note: there were 1 class casts of dynamically created class instances.
You might consider explicitly keeping the mentioned classes and/or
their implementations (using '-keep').
>Note: there were 3 accesses to class members by means of introspection.
You should consider explicitly keeping the mentioned class members
(using '-keep' or '-keepclassmembers').
>Warning: there were 2 unresolved references to library class members.
You probably need to update the library versions.
>Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
:transformClassesAndResourcesWithProguardForArmv7Release FAILED
>FAILURE: Build failed with an exception.
>*What went wrong:
>Execution failed for task ':transformClassesAndResourcesWithProguardForArmv7Release'.
java.io.IOException: Please correct the above warnings first.
>*Try:
>Run with --stacktrace option to get the stack trace. Run with --info or -
debug option to get more log output.
>BUILD FAILED
>Total time: 1 mins 31.84 secs
因爲我對於應用程序開發來說很新,可以在某種程度上禁用ProGuard,直到我知道如何使用/配置它嗎?或者,我必須使用更高的SDK版本號重建這些數字設置的許多位置之一嗎?
可你過去你的應用程序/的build.gradle? –
buildTypes { 調試{ 調試的真 jniDebuggable假 renderscriptDebuggable真正 zipAlignEnabled真正 } 發佈{ 調試的假 jniDebuggable假 minifyEnabled假 pseudoLocalesEnabled假 zipAlignEnabled真正 } } 我發現,設置在項目結構,模塊,構建類型>發佈。並將縮小設置爲false。這使我可以構建和簽署APK –