reactnativecn / react-native-website

React Native 中文网
https://reactnative.cn
MIT License
216 stars 327 forks source link

无法解析配置 ':classpath' 的所有任务依赖关系。 #730

Closed gbnijnugyf closed 7 months ago

gbnijnugyf commented 11 months ago

请按以下格式提供问题的相关信息。

无法解析配置 ':classpath' 的所有任务依赖关系。

1 build.gardle文件如下: image

大佬们救命

sunnylqm commented 11 months ago

纯rn项目还是混编原生?原生集成的话文档有误,已修复

https://github.com/reactnativecn/react-native-website/commit/8d8a4719fd211258bb3ddef97b813215f351d1cd

gbnijnugyf commented 11 months ago

纯rn,通过npx react-native init MyApp --template react-native-template-typescript创建

纯rn项目还是混编原生?原生集成的话文档有误,已修复

8d8a471

sunnylqm commented 11 months ago

文档还没来得及更新,此template已过期,现在直接用init命令(不带--template参数)默认就会创建ts版本的项目了

gbnijnugyf commented 11 months ago

你好。直接用init命令创建了项目,但仍然无法启动,问题仍然存在且相似。 image

文档还没来得及更新,此template已过期,现在直接用init命令(不带--template参数)默认就会创建ts版本的项目了

sunnylqm commented 11 months ago

npx react-native info看下

gbnijnugyf commented 11 months ago

image

emm我已经按照文档下载并配置了Android sdk环境变量,不是很懂,求解

npx react-native info

sunnylqm commented 11 months ago

目前不知道是哪里的问题。。。。

gbnijnugyf commented 11 months ago

呜呜呜

Serendipity-hope commented 11 months ago

一样的问题,有没有大佬解决的 但是我的info有android的SDK,一样报错gradle 8.0.1 和java8问题,react-native的android文件的配置也改了8.0.1,为什么还会报错

sunnylqm commented 11 months ago

检查下settings.gradle 文件,是否和此评论中一致

https://github.com/facebook/react-native/issues/37953#issuecomment-1651351865

image

gbnijnugyf commented 11 months ago

一模一样捏,这是个bug吗。。。哭了

rootProject.name = 'MyApp'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')

检查下settings.gradle 文件,是否和此评论中一致

facebook/react-native#37953 (comment)

image

shijieping0929 commented 10 months ago

我也遇到这个问题,现在有解决方法了吗

shijieping0929 commented 10 months ago

我通过改变java版本到最新的11.0.20+8,再重新init 一个new project就正常了

sunnylqm commented 10 months ago

也有其他人反馈是jdk版本问题,检查下as中jdk的版本

github-actions[bot] commented 7 months ago

👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.