错误:(61,36)错误:找不到符号变量READ_EXTERNAL_STORAGE。
private void getPDF() {
//for greater than lolipop versions we need the permissions asked on runtime
//so if the permission is not available user will go to the screen to allow storage permission
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && ContextCompat.checkSelfPermission(this,
Manifest.permission.READ_EXTERNAL_STORAGE)
!= PackageManager.PERMISSION_GRANTED) {
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.parse("package:" + getPackageName()));
startActivity(intent);
return;
}
答案 0 :(得分:0)
我认为你做错了导入。
试试namespace App\Http\Controllers\admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class PostsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
echo "call to index";
}
........
other functions
}
复制并通过以下代码:
android.Manifest.permission.READ_EXTERNAL_STORAGE