Androidx Activity API属于以下依赖项:
implementation 'androidx.activity:activity:1.3.1'
代码示例:
//导入Androidx Activity API依赖项
implementation 'androidx.activity:activity:1.3.1'
//在代码中使用
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
//...
}