1

Ok guys, I've been trying for about an hour to resolve this error that I'm getting and no dice.

This is the error:

Caused by: java.lang.NoClassDefFoundError: org.openqa.selenium.htmlunit.HtmlUnitDriver at com.painlessshopping.mohamed.findit.MarksSearch$fetcher.doInBackground(MarksSearch.java:167) at com.painlessshopping.mohamed.findit.MarksSearch$fetcher.doInBackground(MarksSearch.java:126) at android.os.AsyncTask$2.call(AsyncTask.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)  at java.lang.Thread.run(Thread.java:818) 

It is a NoClassDefFoundError meaning (at least to my knowledge) that one of the dependencies is messed up. However, upon going into project structure the file dependency is there, aswell as the

compile files('libs/selenium-htmlunit-driver-2.9.0.jar')

line in the app build.gradle file. So what's up?

the specific selenium library that im using in conjunction with this is: selendroid-standalone-0.17.0-with-dependencies.jar

If that has any relevance whatsoever.

Edit: Here is what my Project Structure Dependency Tab Looks Like: Project Structure

Any help is appreciated, frustration level is high :'(

5
  • I think this is similar to stackoverflow.com/questions/3499847/… Commented Jan 8, 2017 at 6:13
  • This error usually appears if you do not add the required classpaths files during compile time. Go to Project-structure select your app under the module tab and to the right under the dependencies tab will list the jars that are being compiled with your program. Commented Jan 8, 2017 at 6:31
  • Yes, your program is looking for that jar file or class in the jar file and it is not in your class path. Commented Jan 8, 2017 at 6:33
  • @coletrain But as I said there is already a file dependency there? Should I change it to a different type of dependency ? Please see the most recent edit Commented Jan 8, 2017 at 14:58
  • @YamahaT64312 the last thing I could think of is make sure all of your classes are included within the package of your android application. If not you could face the issue as listed above. Commented Jan 9, 2017 at 5:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.