第二个 Android 11 开发者预览版现已推出,快来测试并分享您的反馈吧

UiThreadTest

public abstract @interface UiThreadTest
implements Annotation

androidx.test.annotation.UiThreadTest


Methods annotated with this annotation will be executed on the application's UI thread (or main thread).

This annotation will only take effect for Test, Before or After methods.

Summary

Inherited methods

From interface java.lang.annotation.Annotation