- Posts: 2
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
No virtual method RenderPrePare
- bagongjaruh
- Topic Author
- Offline
- New Member
-
Less
More
IP: 192.168.0.71
9 years 1 week ago #12172
by bagongjaruh
No virtual method RenderPrePare was created by bagongjaruh
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 :
Please advise on how to fix the problem.
Or is there any steps i'm missing when upgrading the library?
Thanks.
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 :
Code:
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.
IP: 192.168.0.71
9 years 1 week ago #12173
by support
Replied by support on topic No virtual method RenderPrePare
From which version are you upgrading?
Are you adopting unmodified classes from our framework?
Have you customized it?
Are you adopting unmodified classes from our framework?
Have you customized it?
- bagongjaruh
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
IP: 192.168.0.71
9 years 1 week ago #12174
by bagongjaruh
Replied by bagongjaruh on topic No virtual method RenderPrePare
Thankyou for your quick response. I'm upgrading from :
(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 :
Code:
* @author Radaee
* @version 1.1
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 :
- The app call private boolean openDocument(Bundle savedInstanceState, String docPath)
- <here we do some decrypt method to get the correct password (pass) to open the encrypted pdf>
- Then it goes to : int ret = m_doc.Open(docPath, pass);
- Because ret == 0 (success) we go to this code :
- m_vPDF = new ReaderController(this) where reader controller is : public class ReaderController extends View implements PDFView.PDFViewListener
- and then we define some @Override
- the one method where the Fatal Exception occur was @Overide : public void OnPDFPageDisplayed(Canvas canvas, PDFVPage vpage)
- where because we detect that the pdf isFirstOpen(had no bookmark), we call : m_vPDF.goToPageIndex(lastIndex); where lastIndex == -1
- then the Fatal Exception No virtual method RenderPrePare happens.
Please help us on this problem. Do you have any suggestion on what to do?
Thanks.
IP: 192.168.0.71
9 years 1 week ago #12175
by nermeen
Replied by nermeen on topic No virtual method RenderPrePare
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?
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?
Time to create page: 0.391 seconds