I’m very new to GitHub, so maybe it’s something obvious, but I followed all the steps of many many websites (also the SO questions of course), but it doesn’t work.
I need to change up this GitHub project. (Which is actually a fork of this one)
Importing the GitHub project via Gradle and using it works like a charm. So because I need some little changes, I followed these steps:
- I forked it
- I changed the code how I needed it
- I made a new release (3.1.1): this is my fork
Then:
- I added
maven { url "https://www.jitpack.io" }
to my root gradle - I imported my fork in the app gradle:
implementation 'com.github.tabkus:odomacrop:3.1.1'
- I synchronized gradle
- The importing of my fork seems to work fine because it doesn’t show an error and it downloads a lot of data
But: I cannot use the code. I cannot import the classes. In this case I need for example the class UCrop
as in the code
UCrop.of(...)
.withMaxResultSize(1080, 1080)
.start(activity);
But I cannot import it. I cannot import any class. I also tried Invalidate caches and restart
in Android Studio but that didn’t help either…
It simply says: Cannot resolve symbol 'UCrop'
EDIT:
I followed the answer and it solved an error. But it still didn’t work. So I checked it on jitpack.io . The error now is Execution failed for task ':ucrop:signReleasePublication'. > Could not read PGP secret key
. I looked it up on the internet but I couldn’t find a fix for that. I assume some of the Gradle settings shall include some signing key and mine lack such a key. But since it is a fork, my Gradle files are exactly the same files. (I only made minor changes to some java.classes) jitpack.io/com/github/tabkus/odomacrop/2.2.7-2/build.log
2
Answers
Assuming you see as error message:
Check first if this is similar to
Yalantis/uCrop
issue 779 -withYalantis/uCrop
being the original project)Well…
./gradlew clean assembleDebug
for an Android project.(Add-s
to show more stacktrace if necessary)