Android Studio - PDFRendererBasic - Unable to replace sample.pdf?
问题 Everytime I edit the PDFRendererBasicFragment java code mFileDescriptor = context.getAssets().openFd("sample.pdf").getParcelFileDescriptor(); to a different pdf placed in the assets folder, the application crashes.. Logcat reports: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.pdfrendererbasic/com.example.android.pdfrendererbasic.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.pdf.PdfRenderer