简体   繁体   中英

Android pdfrenderer not working properly with 19 or 21 minsdk

Making a program for Android L' using pdfrenderer the issue is

  1. when 'm running the emulator with minsdk = 21 ERROR - " emulator-5554 disconnected! Cancelling 'com.example.andro_pdf_two.MainActivity activity launch'! "
  2. when 'm trying to run the emulator at minsdk = 19 ERROR at logcat- java.lang.NoClassDefFoundError: android.graphics.pdf.PdfRenderer and Call requires API level 21 (current min is 19): android.graphics.pdf.PdfRenderer#openPage

I have done everything as suggested - resetting adb , resetting preferences ...but nothing seems to be working can anyone help???

Call requires API level 21 (current min is 19): android.graphics.pdf.PdfRenderer#openPage

clearly states that you need a min sdk version of 21 and your app has a current api level of 19

set this in your manifest and try

<uses-sdk android:minSdkVersion="21" />

PDFRenderer assumes minimum API level - 21.

You can use android-pdfview for API level less than 21.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM