设置编译参数``--debug --info发现还是这些东西,实际上
android.support.annotation```我明明写了不要警告,那么到第是什么原因导致的呢?
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 原因: 找不到android.support.annotation.RestrictTo$Scope的类文件
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.259 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY_GROUP
14:20:47.266 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY
14:20:47.316 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY
14:20:49.372 [ERROR] [system.err] 警告: 未知的枚举常量 Scope.LIBRARY
14:20:49.425 [ERROR] [system.err] 注: 某些输入文件使用或覆盖了已过时的 API。
14:20:49.425 [ERROR] [system.err] 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
14:20:49.425 [ERROR] [system.err] 注: 某些输入文件使用了未经检查或不安全的操作。
14:20:49.425 [ERROR] [system.err] 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
14:20:49.425 [ERROR] [system.err] 57 个警告
14:21:22.728 [ERROR] [system.err] Note: there were 11 duplicate class definitions.
14:21:22.728 [ERROR] [system.err] (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
14:21:53.066 [ERROR] [system.err] Warning: The rule `-keep public class *extends java.lang.annotation.Annotation {
14:21:53.066 [ERROR] [system.err] *;
14:21:53.066 [ERROR] [system.err] }` uses extends but actually matches implements.
14:21:55.329 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:packageRelease'.
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > java.io.IOException: Failed to create 'D:\newdev\meiyedana\app\release\app-release.apk'
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
14:21:55.330 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 1m 26s
最后又加上了一个参数坑爹了,终于知道是什么问题了
--info --debug --stacktrace
错误大概信息
dle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ... 104 more
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.io.IOException: Failed to create 'D:\newdev\luozheng\app\release\app-release.apk'
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.builder.internal.packaging.IncrementalPackager.checkOutputFile(IncrementalPackager.java:312)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.builder.internal.packaging.IncrementalPackager.(IncrementalPackager.java:126)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.build.gradle.internal.packaging.IncrementalPackagerBuilder.build(IncrementalPackagerBuilder.java:379)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.build.gradle.tasks.PackageAndroidArtifact.doTask(PackageAndroidArtifact.java:662)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.build.gradle.tasks.PackageAndroidArtifact.splitFullAction(PackageAndroidArtifact.java:495)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.build.gradle.tasks.PackageAndroidArtifact.lambda$doFullTaskAction$2(PackageAndroidArtifact.java:387)
14:34:42.495 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$$inlined$forEach$lambda$1.call(BuildElements.kt:118)
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler$transform$$inlined$forEach$lambda$1.call(BuildElements.kt:107)
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.ide.common.internal.WaitableExecutor.waitForAllTasks(WaitableExecutor.java:215)
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.build.gradle.internal.scope.BuildElements$ExecutorBasedScheduler.transform(BuildElements.kt:122)
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ... 119 more
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.io.IOException: 拒绝访问。
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.builder.internal.packaging.IncrementalPackager.checkOutputFile(IncrementalPackager.java:297)
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ... 128 more
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
14:34:42.496 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 1m 36s
原因是window电脑某些原因导致这个apk已经无法删除了,尝试追踪目录文件,发现右键也无法删除,查看权限,提示是没有权限的.
window 你没有权限查看或编辑这个对象的权限设置
删除是无法删除的,然后我按shift+delete竟然删除成功了...
就因为这个错误我加了这么多信息
#无法编译的继续混淆配置 can't find referenced method 'org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(int,android.net.SSLSessionCache)' in library class android.net.SSLCertificateSocketFactory
-keep class org.apache.http.conn.ssl.**{*;}
-dontwarn org.apache.http.conn.ssl.**
-keep public class * extends java.lang.annotation.Annotation { *;}
-dontwarn java.lang.annotation.**
-keep class android.support.annotation.**{*;}
-dontwarn com.aliyun.**
-dontwarn com.alipay.**
-dontwarn android.support.annotation.**
-keep class com.aliyun.vod.qupaiokhttp.BuildConfig { *; }