Thursday, 15 January 2015

How to resolve this java.lang.ExceptionInInitializerError in android? -



How to resolve this java.lang.ExceptionInInitializerError in android? -

i have issue java.lang.exceptionininitializererror when seek create plugin cordova in android. please can 1 help me solve issue? error occurs in these 2 lines:

m_loadeddoc = new pdfdocument(new filepdfsource((string) path[0]), pdfviewer.this); m_loadeddoc = new pdfdocument(new inputstreampdfsource((inputstream) path[0]), pdfviewer.this);

cordova.getactivity().runonuithread(new runnable() { public void run() { // runs on ui thread

cordova.getactivity().setcontentview(r.layout.main); m_pdfviewer = new pdfviewer(cordova.getactivity()); log.i("log_tag", "yes me phone call else"); urlvalidate = url.startswith("http://") || url.startswith("ftp://") || url.startswith("https://"); string pdfext = url.substring(url.lastindexof(".") + 1); log.i("log_tag", "ext:::" + pdfext); if (urlvalidate == true && pdfext.equals("pdf")) { seek { inputstream input = new url(url).openstream(); m_pdfviewer.loaddocument(input); } grab (ioexception e) { // todo auto-generated grab block e.printstacktrace(); } } else if ((urlvalidate == false) && (pdfext.equals("pdf"))) { m_pdfviewer.loaddocument(url); } } }); public pdfviewer(activity parentactivity) { m_parentactivity = parentactivity; standardfonttf.massetmgr = m_parentactivity.getassets(); llpagepane = (linearlayout) parentactivity.findviewbyid(r.id.pagepane); svscroll = (qscrollview) parentactivity.findviewbyid(r.id.scrollview); svscroll.setpdfviewer(this); m_pagecontentscache = new lrucache(20); m_pageviews = new vector<pdfpageview>(); m_touchhandler = new touchhandlerview(this); } @override protected void doinbackground(object... path) { seek { // release current document if (path[0] instanceof string) { log.i("log_tag", "do in string ::::"+path[0]+"" ); m_loadeddoc = new pdfdocument(new filepdfsource((string) path[0]), pdfviewer.this); } else if (path[0] instanceof inputstream) { log.i("log_tag", "do in stream ::::"+path[0]+"" ); m_loadeddoc = new pdfdocument(new inputstreampdfsource((inputstream) path[0]), pdfviewer.this); } } grab (throwable t) { log.e("error", log.getstacktracestring(t)); log.i("log_tag", "its error;:::::"); m_exception = t; } homecoming null; }

java android phonegap-plugins

No comments:

Post a Comment