我在Android Studio中遇到错误
我是Android Studio的新手,并且在Android Studio中遇到了错误。我该如何解决?
protected void onCreate(final Bundle bundle) {
if (Build.VERSION.SDK_INT >= 30){
if (!Environment.isExternalStorageManager()){
Intent getpermission = new Intent();
getpermission.setAction(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION);
startActivity(getpermission);
}
}
}
I'm new in Android Studio and i am getting errors in Android Studio. How can I fix this?
protected void onCreate(final Bundle bundle) {
if (Build.VERSION.SDK_INT >= 30){
if (!Environment.isExternalStorageManager()){
Intent getpermission = new Intent();
getpermission.setAction(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION);
startActivity(getpermission);
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
导入您在代码中使用的类,
例如,如果要使用意图,请像这样将其导入:
在您的导入语句中添加此行
,否则您只需悬停在代码中的错误上,然后单击“导入类”
Import the classes you are using in your code,
For e.g. if you want to use intent then import it like so:
Add this line in your import statements
or else you can just hover over the error in your code and click on "Import class"