当前位置: 首页 > 知识库问答 >
问题:

在根项目'Android'React Native中找不到'Install Debug'

秋兴思
2023-03-14

我试着在android模拟器上运行我的项目。当我运行react-native run-android时,我会得到以下结果:

FAILURE: Build failed with an exception.

* What went wrong: Task 'installDebug' not found in root project 'android'.

* Try: Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
Build Setup tasks
-----------------
init - Initializes a new Gradle build. [incubating]
wrapper - Generates Gradle wrapper files. [incubating]

Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in root project 'android'.
components - Displays the components produced by root project 'android'. [incubating]
dependencies - Displays all dependencies declared in root project 'android'.
dependencyInsight - Displays the insight into a specific dependency in root project 'android'.
help - Displays a help message.
model - Displays the configuration model of root project 'android'. [incubating]
projects - Displays the sub-projects of root project 'android'.
properties - Displays the properties of root project 'android'.
tasks - Displays the tasks runnable from root project 'android'.

共有1个答案

牧熙云
2023-03-14

react-native run-Android--变体[productFlavorName][Debug/Release]

例如,react-native Run-Android-Variant Huaweidebug

 类似资料:
  • 我目前正在使用Android Studio,我正在尝试进行重建,但我得到以下错误。 我会尝试“try:run with--stacktrace”,但是,我不确定如何做到这一点。有人能帮我排除这个问题吗?谢谢!

  • 我在java代码中使用apollo graphql客户端。我的gradle文件是 我已经遵循了本文中提到的文档https://github.com/apollographql/apollo-android我在第四步和第五步被卡住了。无法添加 在gradle文件中,在执行命令gradlew generateApollo时,在根项目“testProject”中找不到任务“generateApolloS

  • 我遵循了将AAR文件发布到JCenter所需的每一步,然后使用https://github.com/danielemaddaluno/gradle-jcenter-publish.我按照他的步骤13和步骤14写了这个命令,得到了这个错误: G:\Android开发应用程序\Android studio\gradle\gradle-2.2.1\bin 失败:构建失败,但有一个异常。 出错原因: 在根

  • 在0s执行任务时生成失败:[:App:AssembleDebug] 失败:生成失败,出现异常。 > 出错原因:在根项目'demo2'中找不到任务'-continue'。 在https://help.gradle.org获得更多帮助 在0s中生成失败

  • 我试图在android studio 3.1中导入一个项目,但当我尝试构建该项目时,它会显示“在根项目中找不到任务‘汇编’”。我搜索了这个错误,但没有找到直接的答案,像这样的答案对我来说并不适用。有什么解决办法吗? [已解决]:问题是因为缺少设置。格雷德尔档案!只是手动将其添加到主项目文件夹中

  • 我正在尝试使用Maven插件将我的Gradle项目转换为Maven。我遵循这个SO链接,但当我运行Gradle安装命令时,我得到了以下错误 当我执行时,它没有显示安装。在这种情况下该怎么办?