我的应用程序在Android4(至少)上崩溃,并在Android8到10上运行。在Android4 (4.4)上,错误是Could not find method android.app.Activity.checkSelfPermission,但我的代码是: if (Build.VERSION.SdkInt>=BuildVersionCodes.M)
{
if (ContextCompat.CheckSelfPermission(this,Manifest.Permission.WriteExternalStorage) != (int