You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native安卓项目升级Android Gradle插件及compileSdk问题求助

React Native Android Gradle构建问题求助

遇到的Gradle警告

  • 从Android Gradle Plugin(AGP)8.0开始,Maven发布将不再自动创建软件组件,需在gradle.properties中设置android.disableAutomaticComponentCreation=true,或使用新的发布DSL
  • OneSignalPlugin将com.android.support:33.0.0降级至28.+以避免编译错误,建议更新项目的compileSdkVersion
  • 当前使用的AGP 7.2.1仅测试支持到compileSdk 32,若要使用compileSdk 33需升级至更高版本插件

困惑与升级报错

我已在build.gradle中明确指定compileSdkVersion为33,但仍出现上述警告。此外,尝试将AGP从7.0.4升级至7.3.3时,构建失败,报错如下:

> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':classpath'.
      > Could not find com.android.tools.build:gradle:7.3.3.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
          - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
        Required by:
            project :
      > Could not find com.android.tools.build:gradle:7.3.3.
        Searched in the following locations:
          - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
          - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.3.3/gradle-7.3.3.pom
        Required by:
            project : > project :react-native-gradle-plugin

请求帮助解决这些问题。

内容的提问来源于stack exchange,提问作者Justin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 20:45:34