Reputation: 241
This is the line of code I'm having issues with
int permissionCheck = ContextCompat.checkSelfPermission(MainActivity.this,
Manifest.permission.WRITE_EXTERNAL_STORAGE);
It's inside my public class MainActivity extends AppCompatActivity {
There is no option to import anything
Here is a list of my imports
Upvotes: 8
Views: 10008
Reputation: 191701
You are importing the wrong Manifest class...
// import java.util.jar.Manifest; // wrong
import android.Manifest; // correct
or use android.Manifest.permission.WRITE_EXTERNAL_STORAGE
Upvotes: 29
Reputation: 1229
You should import
android.Manifest and not java.util.jar.Manifest
Upvotes: 4