0

I've made a new basic Android app that is just a plain WebView, but, I still managed to get an error to show up in my code:

The constructor AndroidMobileAppSampleActivity.MyCustomWebViewClient(null) is undefined

This is the code in my class: http://pastebin.com/uEP6BGEV

I've tried to fix this by using a 'quick fix' that eclipse gave me, but then my app wouldn't start up anymore.

Yannick
  • 235
  • 3
  • 12

1 Answers1

2

Replace:

localWebView.setWebViewClient(new MyCustomWebViewClient(null));

with:

localWebView.setWebViewClient(new MyCustomWebViewClient());

to avoid the need to define a constructor, particularly since you do not appear to be using one.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks! Sadly, the app still crashes on startup somehow. – Yannick Jul 09 '13 at 12:41
  • @Yannick: Use LogCat to examine the Java stack trace associated with your crash. – CommonsWare Jul 09 '13 at 12:43
  • Got it: http://pastebin.com/T8kdiw1w - Still don't understand what is causing the problem. – Yannick Jul 09 '13 at 12:53
  • @Yannick: Make sure that you have a `com.pocket.Pocket` class. Also, if you are using Eclipse and the R22 tools, make sure that the "Order & Export" portion of your build path is set up properly: http://stackoverflow.com/questions/16596969/libraries-do-not-get-added-to-apk-anymore-after-upgrade-to-adt-22/16596990#16596990 – CommonsWare Jul 09 '13 at 13:01