1

나는 다음과 같은 Gradle을 경고 얻을 릴리스 버전 빌드 할 때 :Gradle을 (ProGuard에서) 예외 동안 작업 java.io에게 (중복 우편 항목을) 처리

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]))))))) 

및 오류 : 아마

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

을 어떤 종류의 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에는 프로젝트의 하위 폴더 aidlIInAppBillingService.aidl 파일을 배치하는 requirement 파일이있었습니다. 하지만 지금은 나도, 모두가 새로운 재생 결제 내 응용 프로그램을 구축하여 좋은 것을 제거했다고 ... 난 그 파일을 제외한 모든 기존의 결제 물건을 제거했다

enter image description here

: 이것은 내 꺼야 도서관.

+1

감사합니다. 내 문제를 해결했습니다. – Vitaly

0

동일한 문제가 나에게 발생하지만 goolge 서비스 인증으로 발생합니다. 문제는 저도 lib를 사용하지 않는다는 것입니다. 이 문제를 해결하는 방법을 모른다 ...

관련 문제