0

在生成签名的 APK 时,我收到了这些警告

Warning: org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ManagementFactory
Warning: org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ThreadMXBean
Warning: org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ThreadMXBean
Warning: org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ManagementFactory
Warning: org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ThreadMXBean
Warning: org.junit.internal.runners.statements.FailOnTimeout: can't find referenced class java.lang.management.ThreadMXBean
Warning: org.junit.rules.DisableOnDebug: can't find referenced class java.lang.management.ManagementFactory
Warning: org.junit.rules.DisableOnDebug: can't find referenced class java.lang.management.RuntimeMXBean
Warning: org.junit.rules.DisableOnDebug: can't find referenced class java.lang.management.ManagementFactory
Warning: org.junit.rules.DisableOnDebug: can't find referenced class java.lang.management.RuntimeMXBean

我应该怎么做才能避免这些警告?在此先感谢您的帮助。

4

1 回答 1

5

在 proguard-rules.pro 文件中添加

-dontwarn java.lang.management.**

这个警告可以避免

于 2016-11-22T10:41:43.070 回答