如何修复proguard?无法使用Proguard构建签名的APK

时间:2019-02-11 10:49:51

标签: android proguard android-proguard

我尝试使用-ignorewarnings进行构建,但这似乎也删除了所有其他警告,还输入了所需的proguard进行改装。

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib- 
jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint- 
layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 
'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:28.0.0' 
implementation 'com.google.code.gson:gson:2.8.4'   
implementation 'com.github.bumptech.glide:glide:4.8.0' 
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.android.support:customtabs:28.0.0' 
implementation 'com.facebook.shimmer:shimmer:0.4.0' 
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
implementation 'com.squareup.retrofit2:converter-simplexml:
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation('com.paytm:pgplussdk:1.2.3') {
    transitive = true
}
// Logging interceptor
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
implementation 'com.google.firebase:firebase-messaging:17.3.4' 
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.android.gms:play-services-auth:16.0.1' 
implementation 'com.google.android.gms:play-services-gcm:16.0.0' 
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
implementation "android.arch.lifecycle:extensions:1.1.1"
implementation "android.arch.lifecycle:viewmodel:1.1.1"
def nav_version = "1.0.0-alpha11"
implementation "android.arch.navigation:navigation-fragment:$nav_version" // use -ktx for Kotlin
implementation "android.arch.navigation:navigation-ui:$nav_version" // use -ktx for Kotlin
implementation "android.arch.navigation:navigation-ui-ktx:$navigation_version"
implementation 'com.android.support:multidex:1.0.3'
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation 'com.segment.analytics.android:analytics:+'
implementation 'com.moengage:moe-android-sdk:9.3.02'
implementation('com.moengage:moengage-segment-integration:3.3.00') {
    transitive = true
}

}

应该进行发布,但是我的proguard配置存在一些问题,我无法确定问题。请帮忙。

原因:org.gradle.api.tasks.TaskExecutionException:任务':app:transformClassesAndResourcesWithProguardForRelease'的执行失败。     在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)     在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)     在org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)处     在org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)     在org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)     在org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)     在org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)处     在org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)     在org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)     在org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)处     在org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)     在org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)     在org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)     在org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)     在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.run(EventFiringTaskExecuter.java:51)     在org.gradle.internal.operations.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)处     在org.gradle.internal.operations.DefaultBuildOperationExecutor $ RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)处     在org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)     在org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)     在org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)     在org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)     在org.gradle.execution.taskgraph.LocalTask​​InfoExecutor.execute(LocalTask​​InfoExecutor.java:42)     在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)处     在org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)处     在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ ExecutorWorker $ 1.execute(DefaultTaskPlanExecutor.java:135)处     在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ ExecutorWorker $ 1.execute(DefaultTaskPlanExecutor.java:130)处     在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)处     在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)处     在org.gradle.execution.taskgraph.DefaultTaskPlanExecutor $ ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)处     ...还有6个

0 个答案:

没有答案