Can not Add Cipher.so to my project
See original GitHub issueHi guys. i’m trying to add this in my project. but i get error. all link has 404 error.
`A problem occurred configuring root project ‘HamrahBankAnsarV3’.
Could not resolve all artifacts for configuration ‘:classpath’. Could not find com.github.MEiDIK:Cipher.so:dev-SNAPSHOT. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/github/MEiDIK/Cipher.so/dev-SNAPSHOT/maven-metadata.xml - https://dl.google.com/dl/android/maven2/com/github/MEiDIK/Cipher.so/dev-SNAPSHOT/Cipher.so-dev-SNAPSHOT.pom - https://dl.google.com/dl/android/maven2/com/github/MEiDIK/Cipher.so/dev-SNAPSHOT/Cipher.so-dev-SNAPSHOT.jar - https://jitpack.io/com/github/MEiDIK/Cipher.so/dev-SNAPSHOT/maven-metadata.xml - https://jitpack.io/com/github/MEiDIK/Cipher.so/dev-SNAPSHOT/Cipher.so-dev-SNAPSHOT.pom - https://jitpack.io/com/github/MEiDIK/Cipher.so/dev-SNAPSHOT/Cipher.so-dev-SNAPSHOT.jar - https://plugins.gradle.org/m2/com/github/MEiDIK/Cipher.so/dev-SNAPSHOT/maven-metadata.xml - https://plugins.gradle.org/m2/com/github/MEiDIK/Cipher.so/dev-SNAPSHOT/Cipher.so-dev-SNAPSHOT.pom - https://plugins.gradle.org/m2/com/github/MEiDIK/Cipher.so/dev-SNAPSHOT/Cipher.so-dev-SNAPSHOT.jar Required by: project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
`
Issue Analytics
- State:
- Created 2 years ago
- Comments:17
For all with the same Problem, the following part blocked that the libcipher-lib.so was packed into the .apk file:
I replaced it with:
So it is working now. Thank you for all your help so far @AdeelTariq!
@CaptainSilva I found a solution to execute ‘generateCipherSo’ automatically. Just add this inside the build.gradle for your individual flavors (if you have different keys for different flavors):
So the ‘extern-keys.h’ will be procuced just before task ‘buildCMakeDebug’ , where it’s needed.
If you do not have different keys you can use the ‘configureCMakeDebug’ task:
Hope it helps.
Jitpack builds are failing and this repository is not the only one effected. Maybe @linisme can fix the problem but they are not maintaining the repo anymore. So the workaround for now is to add a jar of the library to your project. Easiest is to find the cached jar file of the library on your system. Obviously if you never used the library before you won’t have a cached version. In that case you can build the jar file on your own.
To get the cached file, find the gradle cache directory on your system and go to
~/.gradle/caches/modules-2/files-2.1/com.github.MEiDIK
or~/.gradle/caches/modules-2/files-2.1/com.github.linisme
In there you’ll find the cached jar. Copy it to your project. Mine is inside the app/libs folder.
Next add this one line to your top level gradle file:
Your project should compile now. Also the gradle directory may be in a different location. Or your project may be structured differently. So adjust accordingly.