【发布时间】:2016-02-22 07:05:00
【问题描述】:
在我的 Android 应用程序中,我们集成了 Paypal 付款方式。它工作正常。但是我们无法生成 Release Apk。请帮我找出解决方案。
这是我的日志
Information:Gradle tasks [:app:assembleRelease]
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportPaletteV72311Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComMcxiaokeVolleyLibraryAar100Library UP-TO-DATE
:app:prepareComPaypalSdkPaypalAndroidSdk2131Library UP-TO-DATE
:app:prepareIoCardAndroidSdk530Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:processReleaseManifest UP-TO-DATE
:app:processReleaseResources UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:processReleaseJavaRes UP-TO-DATE
:app:compileReleaseJavaWithJavac UP-TO-DATE
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources UP-TO-DATE
:app:proguardRelease
Note: there were 29 duplicate class definitions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Warning:com.paypal.android.sdk.br: can't find referenced class com.google.android.gms.ads.identifier.AdvertisingIdClient
Warning:com.paypal.android.sdk.br: can't find referenced class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info
Warning:com.paypal.android.sdk.br: can't find referenced class com.google.android.gms.common.GooglePlayServicesUtil
Warning:com.paypal.android.sdk.br: can't find referenced class com.google.android.gms.ads.identifier.AdvertisingIdClient
Warning:com.paypal.android.sdk.br: can't find referenced class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info
Warning:com.paypal.android.sdk.br: can't find referenced class com.google.android.gms.common.GooglePlayServicesUtil
Warning:com.paypal.android.sdk.bs: can't find referenced class com.google.android.gms.ads.identifier.AdvertisingIdClient
Warning:com.paypal.android.sdk.bs: can't find referenced class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info
Warning:com.paypal.android.sdk.bs: can't find referenced class com.google.android.gms.ads.identifier.AdvertisingIdClient
Warning:com.paypal.android.sdk.bs: can't find referenced class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info
Warning:okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning:okio.Okio: can't find referenced class java.nio.file.Files
Warning:okio.Okio: can't find referenced class java.nio.file.Path
Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning:okio.Okio: can't find referenced class java.nio.file.Path
Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning:okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning:okio.Okio: can't find referenced class java.nio.file.Path
Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning:okio.Okio: can't find referenced class java.nio.file.Path
Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning:okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning:there were 24 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Exception while processing task
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:473)
at proguard.ProGuard.initialize(ProGuard.java:233)
at proguard.ProGuard.execute(ProGuard.java:98)
at proguard.gradle.ProGuardTask.proguard(ProGuardTask.java:1074)
at com.android.build.gradle.tasks.AndroidProGuardTask.doMinification(AndroidProGuardTask.java:139)
at com.android.build.gradle.tasks.AndroidProGuardTask$1.run(AndroidProGuardTask.java:115)
at com.android.builder.tasks.Job.runTask(Job.java:48)
at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:227)
at java.lang.Thread.run(Thread.java:745)
:app:dexRelease UP-TO-DATE
:app:validateConfigSigning
:app:packageRelease FAILED
Error:Execution failed for task ':app:packageRelease'.
> Unable to compute hash of E:\AMI_REPO\auido\trunk\Customers\AMITekh\C-Tunes\Clients\Android\cTunes\app\build\intermediates\classes-proguard\release\classes.jar
Information:BUILD FAILED
Information:Total time: 5.526 secs
Information:1 error
Information:23 warnings
Information:See complete output in console
构建文件
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:palette-v7:+'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.paypal.sdk:paypal-android-sdk:2.13.1'
}
Proguard.txt 文件
-dontwarn android.support.**
-dontwarn com.parse.*
-dontwarn com.paypal.android.*
-dontwarn com.google.android.gms.*
【问题讨论】:
-
我也有同样的问题。 2.10.0 运行良好...