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
Most often “R cannot be resolved” error appears if there is an issue with some of your resource files. Due to this error, you are unable to build your application. That's why we need to solve this error as it not getting away by just doing a simple restart or hitting Alt+Enter.
The cannot find symbol error, also found under the names of symbol not found and cannot resolve symbol , is a Java compile-time error which emerges whenever there is an identifier in the source code which the compiler is unable to work out what it refers to.
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
You should import
android.Manifest and not java.util.jar.Manifest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With