Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 'installRelease' not found in root project #16854

Closed
ThaJay opened this issue Nov 16, 2017 · 17 comments
Closed

Task 'installRelease' not found in root project #16854

ThaJay opened this issue Nov 16, 2017 · 17 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@ThaJay
Copy link

ThaJay commented Nov 16, 2017

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:)

  1. cd android
  2. ./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

#16617

@ThaJay
Copy link
Author

ThaJay commented Nov 16, 2017

$ react-native run-android --variant=release
Scanning folders for symlinks in /media/dj/dev/scan-app/node_modules (16ms)
JS server already running.
Building and installing the app on the device (cd android && ./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: 1.283 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

@vomchik
Copy link

vomchik commented Nov 26, 2017

i have the same issue

@BuffMcBigHuge
Copy link

BuffMcBigHuge commented Dec 1, 2017

I was able to run manually: cd android && gradlew assembleRelease, but it's outputting app-release-unsigned.apk.

Edit:
It appears I was missing signingConfig in buildTypes > release. See example below:

...
android {
    ...
    defaultConfig { ... }
    signingConfigs {
        release {
                storeFile file(MYAPP_RELEASE_STORE_FILE)
                storePassword MYAPP_RELEASE_STORE_PASSWORD
                keyAlias MYAPP_RELEASE_KEY_ALIAS
                keyPassword MYAPP_RELEASE_KEY_PASSWORD
        }
    }
    buildTypes {
        release {
            ...
            signingConfig signingConfigs.release
        }
    }
}
...

@vomchik
Copy link

vomchik commented Dec 2, 2017

@BuffMcBigHuge useful, but assembleRelease not the same as installRelease

@chriteixeira
Copy link

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.

@mayupat13
Copy link

i have also same issue and i tried to install using adb install that app-release-unsigned.apk it gives me error Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

@alvandyhamed
Copy link

i have the same issue

@smaccoun
Copy link

In addition to @BuffMcBigHuge , I also made the silly mistake of having my-release-key.keystore in [myApp]/android rather than [myApp]/andriod/app

@react-native-bot
Copy link
Collaborator

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 ContributeWhat to Expect from Maintainers

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon. labels Feb 24, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 24, 2018
@DaniloCouto
Copy link

Still Happens on 0.55.2

@ThaJay
Copy link
Author

ThaJay commented Apr 17, 2018

Works for me

@Manoj002
Copy link

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

@segheysens
Copy link

@Manoj002 Have you updated your android/app/build.gradle file to include the signingconfigs and then signingConfig signingConfigs.release inside of the buildTypes?

@Manoj002
Copy link

Manoj002 commented Aug 1, 2018

@segheysens , thanks for your response mate
i got it working by updating the gradle and by properly following the docs again!
though thanks mate!

@zedtux
Copy link
Contributor

zedtux commented Oct 9, 2018

I'm facing this issue, and I don't have the signing things in the Gradle file because I'm using Fastlane to do that instead.

Does that mean I have no option to test it?

@zedtux
Copy link
Contributor

zedtux commented Oct 9, 2018

Thank you @mayupat13 for pointing the adb install command, I'm able to run my app on the phone.

@Lipe16
Copy link

Lipe16 commented Jan 5, 2019

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 {

            storeFile file(MYAPP_RELEASE_STORE_FILE)
            storePassword MYAPP_RELEASE_STORE_PASSWORD
            keyAlias MYAPP_RELEASE_KEY_ALIAS
            keyPassword MYAPP_RELEASE_KEY_PASSWORD
    }
}
buildTypes {
    release {
        minifyEnabled enableProguardInReleaseBuilds
        proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"

        signingConfig 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=****
`

@facebook facebook locked as resolved and limited conversation to collaborators Feb 24, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Feb 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests