Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8586369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:17:38+00:00 2026-06-11T22:17:38+00:00

My Android app was first intended for Android 2.2 onwards so I used player.getSettings().setPluginState(WebSettings.PluginState.ON);

  • 0

My Android app was first intended for Android 2.2 onwards so I used

player.getSettings().setPluginState(WebSettings.PluginState.ON);

for the WebView object.

Now that I’ve decided to open my app to Android 2.1 users, I changed my code to this:

try {
  player.getSettings().setPluginState(WebSettings.PluginState.ON);
} catch (Exception e) {
  player.getSettings().setPluginsEnabled(true);
}

With this, the app force closes and I get this error on my logcat:

Uncaught handler: thread main exiting due to uncaught exception
java.lang.NoClassDefFoundError: android.webkit.WebSettings$PluginState
    at com.dokgu.joindota.WatchVOD.onCreate(WatchVOD.java:34)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
    at android.app.ActivityThread.access$2200(ActivityThread.java:119)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:4363)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    at dalvik.system.NativeStart.main(Native Method)

Any help with this error?

EDIT:
This error only appears on the 2.1 emulator.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:17:40+00:00Added an answer on June 11, 2026 at 10:17 pm

    A bit late – I’m sure you’ve figured it out by now – but the error is caused by the class PluginState not being available on Android versions < 2.2 (API 8). See the android docs on PluginState.

    The reason why you can’t catch this with try {} catch (Exception e) {} is because the NoClassDefFoundError is not an Exception – it’s an Error. While Error and Exception are both children of Throwable they are not the same, hence you cannot catch an Error with an Exception and vice versa.

    To solve this you can take either of the following approaches:

    1. Check which Android version the device is running, and only call PluginState when the device is running API-version >= 8.

    2. In your catch()-statement, catch NoClassDefFoundError instead of Exception.

    Also, Eclipse will most likely show a Lint-warning mentioning the PluginState-class is only available on API 8+. You can hide/ignore this warning by adding @SuppressLint("NewApi") to the line above your method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently creating my first android app and I've a simple class 'Player' I
Up front: This is my first attempt at an Android app. I'm in that
I'm building my first android app - something that will display my tweets in
I am making my first android app, it's a basic webview app which the
This is my first android app. The code that is heavily tied to hardware
I am making my first android app. I want to save an array of
I'm writing my first android app (I'm a noob at android, but decent at
I am currently writing my first Android app and have based most of my
I am starting to build my first Android app. I have reached the point
I just started looking at android app development. For my first test app i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.