Closed kwey521 closed 12 months ago
应用使用TrafficStats.setThreadStatsTag方法时,编译apk后异常,帮忙看看,谢谢 正常使用为: public static void addTrafficStatsTag(String test) { if (Build.VERSION.SDK_INT >= 14) { TrafficStats.setThreadStatsTag(Integer.parseInt(test)); } } 编译后反编译为变成: public static void addTrafficStatsTag(String str) { if (Build.VERSION.SDK_INT >= 14) { Integer.parseInt(str); TestNetwokdispatcher$$ExternalSyntheticThrowNSME0.m(); } } public final / synthetic / class TestNetwokdispatcher$$ExternalSyntheticThrowNSME0 { public static / synthetic / NoSuchMethodError m() { throw new NoSuchMethodError(); } } 运行异常日志是: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.gamehall.sandboxdemo, PID: 13510 java.lang.NoSuchMethodError at com.gamehall.sandboxdemo.TestNetwokdispatcher$$ExternalSyntheticThrowNSME0.m(Unknown Source:2) at com.gamehall.sandboxdemo.TestNetwokdispatcher.addTrafficStatsTag(TestNetwokdispatcher.java:10)
已修复
应用使用TrafficStats.setThreadStatsTag方法时,编译apk后异常,帮忙看看,谢谢 正常使用为: public static void addTrafficStatsTag(String test) { if (Build.VERSION.SDK_INT >= 14) { TrafficStats.setThreadStatsTag(Integer.parseInt(test)); } } 编译后反编译为变成: public static void addTrafficStatsTag(String str) { if (Build.VERSION.SDK_INT >= 14) { Integer.parseInt(str); TestNetwokdispatcher$$ExternalSyntheticThrowNSME0.m(); } } public final / synthetic / class TestNetwokdispatcher$$ExternalSyntheticThrowNSME0 { public static / synthetic / NoSuchMethodError m() { throw new NoSuchMethodError(); } } 运行异常日志是: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.gamehall.sandboxdemo, PID: 13510 java.lang.NoSuchMethodError at com.gamehall.sandboxdemo.TestNetwokdispatcher$$ExternalSyntheticThrowNSME0.m(Unknown Source:2) at com.gamehall.sandboxdemo.TestNetwokdispatcher.addTrafficStatsTag(TestNetwokdispatcher.java:10)