1

I am trying to import a jar file into an android app that I'm working on, but when I try to declare the import statement in my java code for the app, I get "cannot resolve symbol error".

The jar doesn't have a main method as it is just a class that hashes user passwords and stores the hash in a DB, among a few other things. Here's a screen shot of the situation.

I ran "sync project with gradle files" as well. I'm sure it is something simple. Here's a link to some pics regarding my issue.

enter image description here

enter image description here

enter image description here

Error in importing, says package doesn't exist:

2 Answers 2

1

You should add the jar to the compile list too:

compile files('libs/Security.jar')

Hope it works.

0
1

Try in Android Studio File -> Invalidate Caches / Restart... then select Invalidate and Restart.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.