No virtual method RenderPrePare - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: No virtual method RenderPrePare

No virtual method RenderPrePare 1 year 7 months ago #12172

  • bagongjaruh
  • bagongjaruh's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hello, I'm currently trying to upgrade the radaee library on our old android project.
I've replaced the ViewLib source code using your latest version (3.11).
The project run well, until we tried to open any pdf file.
The app would crash generating this Fatal Exception :
E/AndroidRuntime: FATAL EXCEPTION: Thread-1712
                  Process: com.old.project, PID: 12929
                  java.lang.NoSuchMethodError: No virtual method RenderPrePare(Lcom/radaee/pdf/DIB;)V in class Lcom/radaee/pdf/Page; or its super classes (declaration of 'com.radaee.pdf.Page' appears in /data/data/com.old.project/files/instant-run/dex/slice-slice_9-classes.dex)
                      at com.radaee.view.PDFVCache.Render(PDFVCache.java:58)
                      at com.radaee.view.PDFVThread$2.handleMessage(PDFVThread.java:78)
                      at android.os.Handler.dispatchMessage(Handler.java:102)
                      at android.os.Looper.loop(Looper.java:158)
                      at com.radaee.view.PDFVThread.run(PDFVThread.java:114)

Please advise on how to fix the problem.
Or is there any steps i'm missing when upgrading the library?

Thanks.

Please Log in or Create an account to join the conversation.

No virtual method RenderPrePare 1 year 7 months ago #12173

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
From which version are you upgrading?
Are you adopting unmodified classes from our framework?
Have you customized it?

Please Log in or Create an account to join the conversation.

No virtual method RenderPrePare 1 year 7 months ago #12174

  • bagongjaruh
  • bagongjaruh's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Thankyou for your quick response. I'm upgrading from :
* @author Radaee
 * @version 1.1
(from the global.java file)

As I'm not the original developer, and sadly the project documentation is not very helpfull, i cant be certain how much we modified your code. Here I'm assuming by "modifying classes from your framework" means we've modified any code on the ViewLib project. I'm going to check wheter we did modify any code on ViewLib project by comparing the git branches history.

To get to this point, what i did was just create new branch from our latest git code, and replace the code on ViewLib using version 3.11 and then put the professional licence information on Global.java.. hoping that it all will work out of the box. Apparently that is not the case here.

I've also traced the code to find where this method RenderPrePare is called, apparently the chronolgy (from logcat) was this :
  1. The app call private boolean openDocument(Bundle savedInstanceState, String docPath)
  2. <here we do some decrypt method to get the correct password (pass) to open the encrypted pdf>
  3. Then it goes to : int ret = m_doc.Open(docPath, pass);
  4. Because ret == 0 (success) we go to this code :
  5. m_vPDF = new ReaderController(this) where reader controller is : public class ReaderController extends View implements PDFView.PDFViewListener
  6. and then we define some @Override
  7. the one method where the Fatal Exception occur was @Overide : public void OnPDFPageDisplayed(Canvas canvas, PDFVPage vpage)
  8. where because we detect that the pdf isFirstOpen(had no bookmark), we call : m_vPDF.goToPageIndex(lastIndex); where lastIndex == -1
  9. then the Fatal Exception No virtual method RenderPrePare happens.

  10. Please help us on this problem. Do you have any suggestion on what to do?
    Thanks.

Please Log in or Create an account to join the conversation.

No virtual method RenderPrePare 1 year 7 months ago #12175

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
It seems like you did not update the classes under com.radaee.view.
RenderPrePare was replaced with RenderPrepare

If you update these classes accordingly. the exception will not occure.

Note: this may help Where can I get the source code of the Android SDK?

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum