Issue
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);
}
}
}
Solution
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
import android.content.Intent;
or else you can just hover over the error in your code and click on "Import class"
Answered By - Anonymous
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.