React Native报错Task :app:compileDebugKotlin FAILED

"react-native": "0.73.1",

"react-native-safe-area-context": "^4.8.2",

distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip

安装react-native-safe-area-context后一直编辑不通过,查了好久,终于找到原因:

> Task :app:compileDebugKotlin FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

....

找到项目文件:android\build.gradle,用jcenter()替换mavenCentral()即可

repositories {
        maven{ url 'https://maven.aliyun.com/repository/google'}
        google()
      +  jcenter()
      -  mavenCentral()
}

感谢这位老哥的经验,参考:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.-CSDN博客

相关推荐

  1. React 开发整理

    2024-01-20 15:14:03       35 阅读
  2. react怎么做图片处理

    2024-01-20 15:14:03       31 阅读
  3. React 项目解决办法收录

    2024-01-20 15:14:03       43 阅读
  4. React NativeTask :app:compileDebugKotlin FAILED

    2024-01-20 15:14:03       60 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-20 15:14:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-20 15:14:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-01-20 15:14:03       87 阅读
  4. Python语言-面向对象

    2024-01-20 15:14:03       96 阅读

热门阅读

  1. 判断质数(素数):

    2024-01-20 15:14:03       51 阅读
  2. 美易官方:Coinbase美股盘前涨超0.7%

    2024-01-20 15:14:03       53 阅读
  3. Spring Boot应用程序如何配置 HTTPS 访问方式

    2024-01-20 15:14:03       51 阅读
  4. 聊一聊工作中事故的复盘几点想法

    2024-01-20 15:14:03       50 阅读