1

を処理している間、私はリリースバージョンをビルドするとき、私は次のGradleの警告を得る:おそらくのGradle(ProGuardの)例外タスクjava.io(重複zipエントリ)

Error:Execution failed for task 
':app:transformClassesAndResourcesWithProguardForFreeRelease'. 
> Job failed, see logs for details 

Warning:Exception while processing task java.io.IOException: 
Can't write [C:\Users\MyName\AndroidStudioProjects\MyApp\app\build\intermediates\transforms\proguard\free\release\jars\3\1f\main.jar] 
(Can't read [C:\Users\MyName\AndroidStudioProjects\MyApp\app\build\intermediates\classes\free\release(;;;;;;**.class)] 
(Can't read [com] (Can't read [android] (Can't read [vending] (Can't read [billing] 
(Can't read [IInAppBillingService$Stub$Proxy.class] 
(Duplicate zip entry [com/android/a/a/a$a$a.class == com/android/vending/billing/IInAppBillingService$Stub$Proxy.class]))))))) 

とエラーをいくつかの種類のProGuardの問題。私は新しいPlay Billing Libraryを実装しようとして以来です。私はきれいにして、プロジェクトを(いくつかの回)を再構築しようとし、キャッシュを無効にし、再起動、すべて無駄にしようとしました。

ここにはどのようなリソースが含まれているかを確認してください。以下は、関連性のあるスニペットです。

build.gradleから:

compileSdkVersion 26 
buildToolsVersion '26.0.1' 
defaultConfig { 
    minSdkVersion 16 
    targetSdkVersion 26 
} 

buildTypes { 
    release { 
     minifyEnabled true 
     proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    compile project(':playLicensing') 
    compile 'com.android.billingclient:billing:1.0' 
    compile 'com.firebase:firebase-jobdispatcher:0.8.3' 
    compile 'com.google.android.gms:play-services-location:11.4.2' 
    compile 'com.google.android.gms:play-services-places:11.4.2' 
    compile 'com.google.android.gms:play-services-auth:11.4.2' 
    compile 'com.google.guava:guava:23.1-android' 
    compile 'com.android.support:appcompat-v7:26.0.2' 
    compile 'com.android.support:design:26.0.2' 
} 

proguard-rules.proから:

-dontwarn com.google.** 
-keepattributes EnclosingMethod 
-keepattributes JavascriptInterface 
-keepclassmembers class * { 
    @android.webkit.JavascriptInterface <methods>; 
} 
-assumenosideeffects class android.util.Log { 
    public static boolean isLoggable(java.lang.String, int); 
    public static int v(...); 
    public static int i(...); 
    public static int w(...); 
    public static int d(...); 
    public static int e(...); 
} 
-printmapping mapping.txt 

答えて

2

OK私は、問題が何であったかを考え出しました。 previous in-app billing implementationにはrequirementがあり、プロジェクト内のサブフォルダにIInAppBillingService.aidlというファイルが格納されています。しかし、今、私はあまりにも、すべてが新しいプレイ課金で私のアプリを構築すると罰金であることを削除したことを...私は、そのファイルを除くすべての古い課金のものを削除していた

enter image description here

:これは私のものですとしょうかん。

+1

ありがとう、それは私の問題を解決した – Vitaly

0

同じ問題が私に起こっていますが、goolgeサービスの認証があります。問題は、私もそのlibを使用していないということです。これをどのように解決するかわからない...

関連する問題