我遵循了这个文档链接,当我安装它的时候
npm i --save react-native-touch-id和react-native link react-native-touch-id
当我运行npx react原生运行-android时,我会得到这个错误。

如果有人能帮我这件事,那就太好了,提前谢谢你!
误差
error Failed to install the app. Make sure you have the Android
development environment set up:
https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -
PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':react-native-touch-id'.
> Could not resolve all artifacts for configuration ':react-native-
touch-id:classpath'.
> Could not download kotlin-stdlib-jdk8-1.3.20.jar
(org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.20)
> Could not get resource
'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-
jdk8/1.3.20/kotlin-stdlib-jdk8-1.3.20.jar'.
> Could not GET
'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-
jdk8/1.3.20/kotlin-stdlib-jdk8-1.3.20.jar'.
> peer not authenticated
> Could not download jimfs-1.1.jar (com.google.jimfs:jimfs:1.1)
> Could not get resource
'https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.jar'.
> Could not HEAD
'https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.jar'.
> peer not authenticated
> Could not download httpmime-4.5.2.jar
(org.apache.httpcomponents:httpmime:4.5.2)
> Could not get resource`https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.5.2/httpmime-4.5.2.jar.`
> peer not authenticated发布于 2022-07-11 06:36:12
@Shainnah Jane,
嗨,Shainnah Jane,我有同样的问题,我认为是因为compileSdkVersion,因为库为我需要31版本,我使用的是30。当我通过compiledSdkVersion更新的时候,它对我起了作用。
回复自然:去你的根目录-> android -> build.gradle
更改compileSdkVersion 屏幕截图
https://stackoverflow.com/questions/71584166
复制相似问题