SelendroidDriver cannot be resolved - java

I am trying to test a Selendroid test on Eclipse and followed the necessary steps on how to run it. Unfortunately, the two libraries that are mentioned above cannot be resolved to a type. I have added all the necessary jar files in the build path however, but it still cannot be resolved. Is there another way to resolve this problem? Images as here:

I struggled a lot with this error and finally came to know that the paths have been changed in the latest releases.
Use these paths and it shall work:
import io.selendroid.common.SelendroidCapabilities;
import io.selendroid.client.SelendroidDriver;
Tested this for versions 0.15.0 and 0.17.0

Related

Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at runtime [duplicate]

I am trying to run GWT RequestFactory and facing this error:
ClassNotFoundException: org.slf4j.LoggerFactory
I have tried to download slf4j-api-1.3.1.jar but it didnt resolve the issue
Any idea exactly which jar I need to download ?
Better to always download as your first try, the most recent version from the developer's site
I had the same error message you had, and by downloading the jar from the above (slf4j-1.7.2.tar.gz most recent version as of 2012OCT13), untarring, uncompressing, adding 2 jars to build path in eclipse (or adding to classpath in comand line):
slf4j-api-1.7.2.jar
slf4j-simple-1.7.2.jar
I was able to run my program.
Try downloading jar from here
You can find, it holds the class you need.
EDIT
Seems like the website has changed its structure. You need to choose which jar file you need for your project.
For slf4j-api jar file for latest version as of now, please visit this link
For slf4j-simple jar file for latest version as of now, please visit this link
i know this is an old Question , but i faced this problem recently and i looked for it in google , and i came across this documentation here from slf4j website .
as it describes the following :
This error is reported when the org.slf4j.impl.StaticLoggerBinder
class could not be loaded into memory. This happens when no
appropriate SLF4J binding could be found on the class path.
Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar,
slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class
path should solve the problem.
SINCE 1.6.0 As of SLF4J version 1.6, in
the absence of a binding, SLF4J will default to a no-operation (NOP)
logger implementation.
Hope that will help someone .
For a bit more explanation: keep in mind that the "I" in "api" is interface. The slf4j-api jar only holds the needed interfaces (actually LoggerFactory is an abstract class). You also need the actual implementations (an example of which, as noted above, can be found in slf4j-simple). If you look in the jar, you'll find the required classes under the "org.slf4j.impl" package.
You'll need to download SLF4J's jars from the official site as either a zip (v1.7.4) or tar.gz (v1.7.4)
The download contains multiple jars based on how you want to use SLF4J. If you're simply trying to resolve the requirement of some other library (GWT, I assume) and don't really care about using SLF4J correctly, then I would probably pick the slf4j-api-1.7.4.jar since the Simple jar suggested by another answer does not contain, to my knowledge, the specific class you're looking for.
add this dependency
https://mvnrepository.com/artifact/org.slf4j/slf4j-api/1.7.28
will help fix error
I got this problem too and I fixed it in this way.
I was trying to run mapreduce job locally through Eclipse, after set the configurations, I met this error (in Linux, Virtual Box)
To solve it,
right click on the project you want to run,
go "Properties"->"Java
Build Path"->"Add External Jars",
then go to
file:/usr/lib/Hadoop/client-0.20, choose the three jars named started
by "slf4j".
Then you'll be able to run the job locally.
Hope my experience will help someone.
Add the following JARs to the build path or lib folder of the project:
slf4j-api-1.7.2.jar
slf4j-jdk14-1.7.2.jar
It needs "slf4j-simple-1.7.2.jar" to resolve the problem.
I downloaded a zip file "slf4j-1.7.2.zip" from http://slf4j.org/download.html. I extracted the zip file and i got slf4j-simple-1.7.2.jar
I had the same on Android. This is how i fixed it:
including ONLY the file:
slf4j-api-1.7.6.jar
in my libs/ folder
Having any additional slf4j* file, caused the NoClassDefFoundError.
Obviously, the rest of the libs can be there (android-support-v4, etc)
Versions:
Eclipse Kepler 2013 06 14 - 02 29
ADT 22.3
Android SDK: 4.4.2
Hope someone saves the time i wasted thanks to this!

The import org.eclipse.ui.internal.ShowViewAction cannot be resolved

I can not figure out what I am missing solve this import error. I have org.eclipse.ui_3.107.0.v20150507-1945.jar included in my build path, but it does not seem to be what is required. I've tried including all the other org.eclipse.ui.* jar files in my build path but none seem to be resolving the import error. Does any one know what is needed for this?
I'm a relatively new java developer, but have run into the "The import * cannot be resolved" quite a bit and the only way I've found to fix it, if it can't be auto resolved with eclipse's quick fix, is to try and guess what jar needs to be added to the build path. Is there a more reliable method or is trial and error what it comes down to?
This is an internal class (the package name includes 'internal'). You should not be trying to use it. Internal classes are often created / changed / deleted without warning between Eclipse releases.
See Eclipse API Rules of Engagement for more information about the Eclipse API.
This particular action existed in Eclipse 3.x but is no longer present in Eclipse 4. The action essentially calls IWorkbenchPage.showView, you will have to write your own action to do the same.

Twilio API issue

Hello stackoverflow,
This might be a really easy question but I am having issues with building a basic sms reply application in java. I googled around and couldn't find a solution for my problem. The issue occurs when I do the following imports:
import com.twilio.sdk.verbs.TwiMLResponse;
import com.twilio.sdk.verbs.TwiMLException;
import com.twilio.sdk.verbs.Message;
Eclipse throws an error when I try calling and implementing the Message class sayingThe import com.twilio.sdk.verbs.Message cannot be resolved . I have no issues with the other classes, just the Message class. And I have used Maven to compile the project.
Anybody have any solutions and/or solutions for this issue?
You need to specify external libraries in the Build Path.
In Eclipse right click on your project > Build Path > Configure Build Path > Libraries > Add JARs (or "Add External JARs" if you didn't copy it into your project folder).
If it still doesn't work there might be dependencies you are missing, so you need those as well. To save the headache you could also use Maven to download them automatically.
I was using the wrong Twilio SDK version in my maven dependency. I was using 3.3.15 and I updated it to 4.4.2 and it solved my issue. Thanks for all the comments and replies

Multiple dex files error when building project downloaded from git

So I have a project that works totally fine in one workspace on my machine. I push it to the repository so everyone else can work on it. I go to pull it down making sure all the changes are good. I import the project into a new workspace and using eclipse with autobuild on it produces no errors.
I go to the command line and run ant clean release on the project and right before it gets to run crunch on the assets the build fails with a mulitple dex files define error. Ive checked the project high and low and compared to the other copy of it in the original workspace but for what ever reason I cant get it to build. I erase the bin and gen folders and remove all the imports and basically leave just the project, run clean in eclipse, and still get a dex define error related to one of the lib projects classes. Ive tried to find where extra copies could be but I dont find anything.
googling around for the past few days hasnt helped as the normal solutions to such a problem havent worked for me. So what is the best way to figure out where the extra class definitions are coming from so I can get rid of them and fix the repository so I can use it correctly. I have a feeling its related to one of the files in the project that I should be excluding in my gitignore but Im not sure which that would be. Any help on the matter would be greatly appreciated cause this has eaten quite a bit of time of just messing around.
When you have more than one class with the same package name this error would raise.
One of the common source of this issue is when you have for example different version on the same library.
For example your add ActionbarSherlock which in 'libs forder has it's own support library and also your project has another version of support library in it's libs folder. In such a cases you should put one version of support library.jar to all different libraries that you using it.
I hope this could help you.
I didnt find the root of the problem but I figured out a fix. I moved all the support libraries to a new root folder completely away from the android project. Once I did that and cleaned everything I then ran ant clean release and the project built fine.

Problems getting Jar file to link correctly. Verify Errors

I've been searching the web for a long time, and it seams that this VerifyError isn't that uncommon and can have multiple reasons for tripping. I have created a project, that I've exported as a jar file. It is built with android 2.2 (API 8). This part works fine. But I have a separate project that when I try to import it, I start having problems.
The only way I've been able to get it to work, is to import the jar into a libs folder I created. It then get's automatically added as an Android Dependency and I can use it fine, however I can't attach my javadoc file to it, and in my build configuration it says I can't modify the dependency. (Can't link to a javadoc).
What I thought I should be able to do is simply add it as an external jar, then link the javadoc and source. If I do this, the code that uses the jar shows no errors, and the javadoc comments work. However I keep getting a VerifyError when I run it. I've attached a stack trace that shows the errors. I'm completely out of ideas, does anyone have any suggestions? Am I building the jar file wrong? Am I importing it wrong?
If anyone can help point me in a constructive direction, it would be really appreciated.
Thanks
Stack trace:
Ok, so this was frustrating to solve. The solution took about 20 seconds when I spent over an hour researching the problem.
What I had to do was go to:
Properties -> Java Build Path -> Order and Export
But rather than just clicking the external jar, I had to move it up to the top of the list for the build path order.
Credit definitely goes to yorkw for pointing me in the right direction.
I believe that Android jar files are a little different.
You could try putting the JAR files into the Android "dx" tool
It's in the ~/android-sdk/platform-tools

Categories

Resources