Probably a very silly problem but I cannot add jbcrypt from mindrot.org https://www.mindrot.org/projects/jBCrypt/ to my existing android studios application.
2 Answers
add repository mavenCentral()
in the project's build.gradle
and then add this dependency to the module's build.gradle
:
dependencies {
implementation "org.mindrot:jbcrypt:0.4"
}

- 1
- 19
- 155
- 216
I don't know if this is the correct/best way to include jBCrypt into an android studio project. This is how I solved the problem in windows 10.
Go to GitHub and download this zip file -> https://github.com/jeremyh/jBCrypt
Extract, and cut out the BCrypt.java file and paste into the project under app/java/yourpackagename/ (add to same location as the android activities, or wherever you want to keep it organized)
Change the package name in the Bcrypt.java file so that your project will compile.
Finally, import the package, and google jBCrypt examples to understand how to use the class, or dive right into the source.
The only file you add to your project is BCrypt.java
Hope this helps!

- 1
- 1