Closed aaroncornelissen closed 3 years ago
If you have followed upgrade-helper and removed the jcenter maven repository, I believe you will need to add it back to your build.gradle file.
Can you test if that fixes your build?
react-native core no longer requires jcenter I believe, but there are many native modules wrapping libraries that are still only available on jcenter.
I have new project with RN 0.65.1 the same problem accurs. Add mavenCentral() on build.gradle file, the same. Could not find com.wei.android.lib:fingerprintidentify:1.2.6
jcenter not mavenCentral.
My comment was very specific about that! https://github.com/hieuvp/react-native-fingerprint-scanner/issues/192#issuecomment-910393375
Thankyou @mikehardy, it seems to work! Now I have problems with 'react-native-reanimated', but that is another problem.
My build.gradle file is now like this:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
firebaseIidVersion = "19.0.1"
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
}
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.1")
classpath ('com.google.gms:google-services:4.3.3')
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
With jcenter() it works. Thank you @mikehardy !
File with reanimated if needed, but for reanimated you need their latest alpha for rn 65+, try that first
File with reanimated if needed, but for reanimated you need their latest alpha for rn 65+, try that first
Thank you for thinking along.
I've installed the latetst alpha release what solves the compiling problem, but after comiling the app crashes (See issue).
There is an issue for the 0.65 RN compatibility (see issue). They expect to release an RN 0.65 compatible release in the next few days.
Sounds like react-native 0.64.2 is for you for now....
Yes, adding jcenter() to build.gradle works
Re-adding jcenter is only a temporary solution, since jcenter will be offline in February 2022. š
@matteodanelli no, it won't. They will leave it up indefinitely for read access. If you know differently please please provide a reference from them as the last time I checked (and I check frequently) they say read-only indefinitely.
@mikehardy Right, I've missed the "read-only" update. Anyway, isn't better to move away from jcenter? It's impossible to push update to libraries there. Imho, the solution to drop jcenter isn't so bad.
@matteodanelli it's almost as if someone should propose a PR and we should merge it, in order to get rid of jcenter, oh wait #189 ;-)
Just needs a release. Would you like to help maintain the package and help get releases out the door? I'm pretty low on time. Or at minimum you could use the tip of the current main branch as a gitref in package.json and report your results, letting us know it is working or not, checking+protecting quality prior to release is most of the time required for release...
I understood your point. However, on the current main branch jcenter wasn't completely removed. It has been removed partially in that MR. I'm already testing in my app with patch-package the complete removal and I can do a PR. Last, yes, I can help you with releases.
Oooo - I thought it was out completely with that one. Thanks for checking complete removal, excited for a PR to really remove it where needed! Thanks
Here the MR. Removed completely jcenter and replaced with jitpack where needed. Tested also with the sample updated to RN 0.65.1, as pointed out in this issue.
Hi, I cannot get the artifact from jitpack.
https://www.jitpack.io/com/wei/android/lib/fingerprintidentify/1.2.6/fingerprintidentify-1.2.6.pom
It returns not found.
That looks like the wrong URL. The dependency here is https://github.com/hieuvp/react-native-fingerprint-scanner/blob/54b06e1f354628ea472c3f6527f7652a85081f22/android/build.gradle#L52
Looks great https://www.jitpack.io/com/github/uccmawei/fingerprintidentify/1.2.6/fingerprintidentify-1.2.6.pom
@mikehardy My jenkins is trying to get that artifact though.
10:30:36 > Could not resolve com.wei.android.lib:fingerprintidentify:1.2.6. 10:30:36 Required by: 10:30:36 project :app > project :react-native-fingerprint-scanner 10:30:36 > Could not resolve com.wei.android.lib:fingerprintidentify:1.2.6. 10:30:36 > Could not get resource 'https://www.jitpack.io/com/wei/android/lib/fingerprintidentify/1.2.6/fingerprintidentify-1.2.6.pom'. 10:30:36 > Could not GET 'https://www.jitpack.io/com/wei/android/lib/fingerprintidentify/1.2.6/fingerprintidentify-1.2.6.pom'.
It's from the dependency you said. Do I forget any configuration?
@agestaun using the git blame function you have at your disposal
https://github.com/matteodanelli/react-native-fingerprint-scanner/blame/master/android/build.gradle
You can deduce that the dependency was changed 8 months ago in https://github.com/matteodanelli/react-native-fingerprint-scanner/commit/9158acec120056d6b567dd434d65d8b055625734
And that commit has not been released, there have been no releases here recently though the package is alive
I think you'll need to depend on the most recent commit hash then, and treat it as a release in your package.json
This is the commit hash https://github.com/hieuvp/react-native-fingerprint-scanner/commit/54b06e1f354628ea472c3f6527f7652a85081f22 (edit, corrected the URL just now)
This is a built in feature of npm/yarn, you just specify the repo URL with #<commit hash>
at the end and it works.
I saw that there have been no new versions recently and the jcenter was completely removed. I didn't want to point to a commit, but it's better than the crash I get when compiling.
Thank you mike.
Yeah, no alternative at the moment but the commit hash as reference. Need to get a release out here but been swamped :-) At least from a build reproducibility perspective commit hashes are stable unique identifiers, no one can change the contents on that really, so it should be safe. Alternatively you can point to the existing most recent release and ingest the changes locally via patch-package if you have really strict build reproducibility / security concerns
perhaps a slightly better solution instead adding whole jcenter()
.... in project level build.gralde
file add...
jcenter() {
content {
// these groups only available in jcenter otherwise we don't want to rely on jcenter.
.
.
.
includeModule("com.wei.android.lib", "fingerprintidentify") // <== Add this line
}
}
@noumantahir that's a nice trick, should have a non-trivial positive impact on the artifact resolution phase build performance
jcenter() has gone offlineš¢ is there anything we can do on the ap side
jcenter() has gone offlineš¢ is there anything we can do on the ap side
try replacing in node_modules/react-native-fingerprint-scanner/build.gradle
implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"
->
implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'
Does this not work, from above? Depending on the commit hash?
I think you'll need to depend on the most recent commit hash then, and treat it as a release in your package.json
This is the commit hash https://github.com/hieuvp/react-native-fingerprint-scanner/commit/54b06e1f354628ea472c3f6527f7652a85081f22 (edit, corrected the URL just now)
This is a built in feature of npm/yarn, you just specify the repo URL with #
i fixed it using latest commit in my package.json
(but patching implementation
in build.gradle also works, i tried)
index afb0555..55617e9 100644
--- a/package.json
+++ b/package.json
@@ -81,7 +81,7 @@
"react-native-default-preference": "^1.4.4",
"react-native-device-info": "^10.2.0",
"react-native-elements": "^3.4.2",
- "react-native-fingerprint-scanner": "^6.0.0",
+ "react-native-fingerprint-scanner": "git+https://github.com/hieuvp/react-native-fingerprint-scanner.git#9cecc0db326471c571553ea85f7c016fee2f803d",
Thank you for all the answers We also found a Jcenter mirror which worked fine
maven { url "https://maven.aliyun.com/repository/jcenter" }
Could not find com.wei.android.lib:fingerprintidentify:1.2.6. I am stuck with this issue I have tried with jcenter() and without jcenter() and its not working its throwing the same error while building Can anyone help me out for this issue
it's already 2023, and the problem has not been solved? Why can't the official repository fix it?
@valery-lavrik you do not appear to be the primary maintainer on any repositories, maintain a repo for a few years, then come back and let us know
jcenter() has gone offlineš¢ is there anything we can do on the ap side https://bintray.com/ https://jcenter.bintray.com/
try replacing in node_modules/react-native-fingerprint-scanner/build.gradle
implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"
->implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'
Worked for me.
// implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"
implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'
jcenter() has gone offlineš¢ is there anything we can do on the ap side https://bintray.com/ https://jcenter.bintray.com/
try replacing in node_modules/react-native-fingerprint-scanner/build.gradle
implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"
->implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'
Thanks now working
i fixed it using latest commit in my package.json (but patching
implementation
in build.gradle also works, i tried)index afb0555..55617e9 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "react-native-default-preference": "^1.4.4", "react-native-device-info": "^10.2.0", "react-native-elements": "^3.4.2", - "react-native-fingerprint-scanner": "^6.0.0", + "react-native-fingerprint-scanner": "git+https://github.com/hieuvp/react-native-fingerprint-scanner.git#9cecc0db326471c571553ea85f7c016fee2f803d",
This works well, thank you.
love you bro
jcenter() has gone offlineš¢ is there anything we can do on the ap side https://bintray.com/ https://jcenter.bintray.com/
try replacing in node_modules/react-native-fingerprint-scanner/build.gradle
implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"
->implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'
Thats awesome. You saved my day, thank bro
jcenter() has gone offlineš¢ is there anything we can do on the ap side https://bintray.com/ https://jcenter.bintray.com/
try replacing in node_modules/react-native-fingerprint-scanner/build.gradle
implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"
->implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'
Fantastic, thank you
FingerprintIdentify
plz help me I set this config but I have another bug
Execution failed for task ':react-native-fingerprint-scanner:generateReleaseRFile'.
Could not resolve all files for configuration ':react-native-fingerprint-scanner:releaseCompileClasspath'. Failed to transform react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-symbol-with-package-name, com.android.build.api.attributes.BuildTypeAttr=release, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}. Could not find react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0). Searched in the following locations: https://jcenter.bintray.com/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0-release.aar
HERE IS THE SOLUTION:
In your package.json, alter the dependency on this module like so to get the non-jcenter version that has not been released yet:
Since I've upgraded my RN from 0.64.2 to 0.65.1 a problem occured with compiling my app for android.
Does someone know how to download the missing library?
Many thanks.