简体   繁体   English

错误:在运行 React Native 项目时无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系

[英]Error : Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' while running React Native Project

I have got an error while trying to run my React Native project.尝试运行我的 React Native 项目时出现错误。

react-native run-android

Error looks like错误看起来像

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at 'E:\IT tasks\android\ninja-react-native\android\local.properties'.

Please help me.请帮我。

Add SDK (sdk.dir) location path in local.properties file:在 local.properties 文件中添加SDK (sdk.dir) 位置路径:

For windows users:对于 windows 用户:

sdk.dir = C:\\Users"MyUserName"\\AppData\\Local\\Android\\Sdk

For Mac users:对于 Mac 用户:

sdk.dir = /Users/USERNAME/Library/Android/sdk

For Linux users:对于 Linux 用户:

sdk.dir = /home/USERNAME/Android/Sdk

Replace Username with your's users Name.将用户名替换为您的用户名。 And check that sdk forlder name is Sdk or sdk, replace with it.并检查 sdk 的名称是否为 Sdk 或 sdk,替换为它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 错误=>无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - Error=> Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 任务“:app:compileDebugJavaWithJavac”执行失败。 在运行 React Native 项目时 - Execution failed for task ':app:compileDebugJavaWithJavac'. while running React Native Project 我无法执行 npx react-native run-android,Java 错误; 无法确定任务“:app:compileDebugJavaWithJavac”的依赖关系。 LINUX - I can't do npx react-native run-android, Java error; Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. LINUX Flutter 构建错误:无法确定任务':app:compileDebugJavaWithJavac的依赖关系 - Flutter Build Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac flutter 错误无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - flutter error Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。[Flutter] - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.[Flutter] 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Flutter - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' - Flutter 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。 (一个信号) - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. (OneSignal) 无法确定任务 ':app:compileDebugJavaWithJavac' Flutter 的依赖关系 - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' Flutter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM