react-native: Task 'installRelease' not found in root project
Is this a bug report?
yes
Have you read the Contributing Guidelines?
yes
Environment
Environment: OS: Linux 4.13 Node: 6.11.4 Yarn: Not Found npm: 3.10.10 Watchman: 4.7.0 Xcode: N/A Android Studio: Not Found
Packages: (wanted => installed) react: ^16.0.0 => 16.0.0 react-native: ^0.50.3 => 0.50.3
Steps to Reproduce
(Write your steps here:)
- cd android
- ./gradlew installRelease
Expected Behavior
release version of app is installed on connected device like in previous version of react-native
Actual Behavior
$ ./gradlew installRelease
Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
Task 'installRelease' not found in root project 'AppName'. Some candidates are: 'uninstallRelease'.
* 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
Total time: 3.648 secs
Reproducible Demo
follow steps to reproduce
related issue
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (2 by maintainers)
I was able to run manually:
cd android && gradlew assembleRelease
, but it’s outputtingapp-release-unsigned.apk
.Edit: It appears I was missing
signingConfig
inbuildTypes
>release
. See example below:i have the same issue
Still Happens on 0.55.2
@Manoj002 Have you updated your
android/app/build.gradle
file to include thesigningconfigs
and thensigningConfig signingConfigs.release
inside of thebuildTypes
?@segheysens , thanks for your response mate i got it working by updating the gradle and by properly following the docs again! though thanks mate!
hello people, i tried @BuffMcBigHuge solution but still getting same error Task ‘installRelease’ not found in root project ‘android’. Some candidates are: ‘installDevRelease’. i did everything as mentioned in docs, but i guess still missing out something
Works for me
As @BuffMcBigHuge said, the problem is the missing singinConfig in gradle files. You have to proper configure it as described in https://facebook.github.io/react-native/docs/signed-apk-android.html and the
installRelease
will work.tenha certeza de ter gerado o certificado na pasta android/app/ veja como gerar em https://facebook.github.io/react-native/docs/signed-apk-android
android/app/buid.gradle ` // … signingConfigs { release {
//…`
e no android/gradle.properties ` MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=****
MYAPP_RELEASE_KEY_PASSWORD=**** `
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?
I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.
How to Contribute • What to Expect from Maintainers
In addition to @BuffMcBigHuge , I also made the silly mistake of having my-release-key.keystore in
[myApp]/android
rather than[myApp]/andriod/app