Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
369 views
in Technique[技术] by (71.8m points)

android - 在根项目'android'React Native中找不到'installDebug'('installDebug' not found in root project 'android' React Native)

I am trying to run my project on the android simulator.

(我正在尝试在android模拟器上运行我的项目。)

When I run react-native run-android I am getting the following:

(当我运行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

If I run ./gradlew tasks I get:

(如果我运行./gradlew tasks得到:)

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'.

Any idea why I don't have a installDebug task in my project?

(知道为什么我的项目中没有installDebug任务吗?)

How do I get it back?

(我该如何找回?)

  ask by Stephen Horvath translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

react-native run-android --variant [productFlavorName][debug/release]

(react-native运行android --variant [productFlavorName] [debug / release])

eg react-native run-android --variant Huaweidebug

(例如react-native run-android --variant Huaweidebug)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...