Closed gbnijnugyf closed 7 months ago
纯rn项目还是混编原生?原生集成的话文档有误,已修复
纯rn,通过npx react-native init MyApp --template react-native-template-typescript创建
纯rn项目还是混编原生?原生集成的话文档有误,已修复
文档还没来得及更新,此template已过期,现在直接用init命令(不带--template参数)默认就会创建ts版本的项目了
你好。直接用init命令创建了项目,但仍然无法启动,问题仍然存在且相似。
文档还没来得及更新,此template已过期,现在直接用init命令(不带--template参数)默认就会创建ts版本的项目了
npx react-native info看下
emm我已经按照文档下载并配置了Android sdk环境变量,不是很懂,求解
npx react-native info
目前不知道是哪里的问题。。。。
呜呜呜
一样的问题,有没有大佬解决的 但是我的info有android的SDK,一样报错gradle 8.0.1 和java8问题,react-native的android文件的配置也改了8.0.1,为什么还会报错
检查下settings.gradle 文件,是否和此评论中一致
https://github.com/facebook/react-native/issues/37953#issuecomment-1651351865
一模一样捏,这是个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)
我也遇到这个问题,现在有解决方法了吗
我通过改变java版本到最新的11.0.20+8,再重新init 一个new project就正常了
也有其他人反馈是jdk版本问题,检查下as中jdk的版本
👋 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.
请按以下格式提供问题的相关信息。
无法解析配置 ':classpath' 的所有任务依赖关系。
Android studio版本:android-studio-2022.2.1.20-windows
RN版本:0.72
问题描述:
问题原因:A problem occurred configuring root project 'MyApp'. 在配置根项目 'MyApp' 时出现了问题。
子问题1:Could not determine the dependencies of null. 无法确定空(null)的依赖项。
子问题2:Could not resolve all task dependencies for configuration ':classpath'. 无法解析配置 ':classpath' 的所有任务依赖关系。
子问题3:Could not find com.android.tools.build:gradle:. 找不到 com.android.tools.build:gradle:。这是项目需要的依赖项。
子问题4:Could not resolve com.facebook.react:react-native-gradle-plugin. 找不到 com.facebook.react:react-native-gradle-plugin。这是项目需要的插件。
子问题5:No matching variant of project :gradle-plugin was found. 找不到匹配的 project :gradle-plugin 的变种。这是与 com.facebook.react:react-native-gradle-plugin 相关的问题。
其他:在报错中提到了 com.facebook.react:react-native-gradle-plugin 的不兼容性问题。它声明了一组件,用于编译时,兼容 Java 11,而使用者需要在运行时兼容 Java 8。此外,报错中还提到了一些其他的兼容性问题,比如版本号('org.gradle.plugin.api-version')不匹配等。
大佬们救命