Скажи мне.В res / raw /template.pdf есть ресурс.PDF открывается, работает, но когда вы пытаетесь открыть из приложения:
AssetFileDescriptor descriptor = context.getResources().openRawResourceFd(R.raw.template);
Я получаю ошибку:
android.content.res.Resources$NotFoundException: File res/raw/template.pdf from drawable resource ID #0x7f0e0000
Я пытался открыть, как это (я все еще получаю то же самоеошибка):
AssetFileDescriptor descriptor = context.getResources().openRawResourceFd(context.getResources().getIdentifier("template", "raw", context.getPackageName()));
Что делать?
Я сделал Clean and Rebuild Project
, Invalidate cache and restart
и переименование, копирование файла, ничто не может мне помочь.