Diya
Diya

Reputation: 107

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???

Upvotes: 2

Views: 3351

Answers (2)

jay
jay

Reputation: 2032

PDFRenderer assumes minimum API level - 21.

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

Upvotes: 0

archon92
archon92

Reputation: 447

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" />

Upvotes: 1

Related Questions