RadaeePDF.com :: Topic: java.lang.NoSuchMethodError (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: java.lang.NoSuchMethodError

java.lang.NoSuchMethodError 3 years 3 months ago #7004

  • Rashaverak
  • Rashaverak's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
I get this verytime I try to open pdf, doesnt matter if I use assets, http or file

java.lang.NoSuchMethodError: no method with name='writeable' signature='()Z' in class Lcom/radaee/util/PDFFileStream;
public class PdfActivity extends AbstractRenderActivity {

    private ViewPager pager;
    private PdfViewPagerAdapter adapter;

    private PdfControllerView pdfControllerView = null;
    private Document pdfDocument = new Document();
    private PDFFileStream stream = new PDFFileStream();

    @Override
    protected void doDirectlySelectNewPage(int page) {

    }

    @Override
    protected void initLayout() {
        setContentView(R.layout.html_activity);
    }

    @Override
    protected void doOnPostCreate(Bundle savedInstanceState) {

        pager = (ViewPager) findViewById(R.id.pager);
        adapter = new PdfViewPagerAdapter();
        pager.setAdapter(adapter);



        Global.Init(this);
        pdfControllerView = new PdfControllerView(this);
        pdfDocument.Close();
        Log.debug("pdf - file path" + fileDocument.getPdfPath());
        stream.open(fileDocument.getPdfPath());
        int ret = pdfDocument.OpenStream(stream, null);

        switch(ret) {
            case -1://need input password
                finish();
                break;
            case -2://unknown encryption
                finish();
                break;
            case -3://damaged or invalid format
                finish();
                break;
            case -10://access denied or invalid file path
                finish();
                break;
            case 0://succeeded, and continue
                break;
            default://unknown error
                finish();
                break;
        }

        if (ret == 0) {
            pdfControllerView.open(pdfDocument);
            adapter.addItem(pdfControllerView);
        }
    }

    @Override
    protected void doToggleIL() {

    }

    @Override
    protected void doToggleMode() {

    }

    @Override
    protected void doInitPages(List<Page> pages) {

    }

    @Override
    protected void onDestroy() {
        if (pdfControllerView != null) {
            pdfControllerView.close();
            pdfControllerView = null;
        }

        if (pdfDocument != null) {
            pdfDocument.Close();
            pdfDocument = null;
        }

        if (stream != null) {
            stream.close();
            stream = null;
        }
        Global.RemoveTmp();

        super.onDestroy();
    }
}
The administrator has disabled public write access.

java.lang.NoSuchMethodError 3 years 2 months ago #7010

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
seems you mixed old version of codes.
The administrator has disabled public write access.

java.lang.NoSuchMethodError 3 years 2 months ago #7011

  • Rashaverak
  • Rashaverak's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
The lib is from PDFViewer2.9.11\PDFHttpDemo\libs\

Downloaded yesterday from your pages Download -> Android
The administrator has disabled public write access.

java.lang.NoSuchMethodError 3 years 2 months ago #7045

  • Rashaverak
  • Rashaverak's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
problem solved, it was because of proguard
The administrator has disabled public write access.
Powered by Kunena Forum