Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'installDebug' not found in root project 'android' React Native

I am trying to run my project on the android simulator. When I run react-native run-android I am getting the following:

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:

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? How do I get it back?

like image 357
Stephen Horvath Avatar asked Aug 24 '16 09:08

Stephen Horvath


1 Answers

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

e.g. react-native run-android --variant Huaweidebug

like image 95
Kenny Tian Avatar answered Sep 25 '22 16:09

Kenny Tian