[ACCEPTED]-Android Studio : install Release App by command line-android-gradle-plugin

Accepted answer
Score: 23

My experience has been that the installRelease task does 4 not become available until you define the 3 signingConfigs in the buildTypes.release block of your build file, as shown 2 in step 3 of Signing in Release Mode. Without signingConfigs, you will get other 1 release tasks, such as assembleRelease, but not installRelease.

Score: 1

So there is no such task. You can see all 3 available tasks calling gradlew tasks. To assemble release 2 version of apk call gradlew assembleRelease and then using adb install 1 it.

Score: 0

You may build with Android Studio Build/Generate Signed APK.... In this 7 case you'll get .apk file in your repository. You 6 then can use adb install .apk to install it. You'll have 5 no changes in build.gradle file in this case.

Alternatively 4 you may change build.gradle file as mentioned here. In this 3 case you will have installRelease task. You may get these 2 changes in build.gradle using Open Module Settings menu. See details in 1 Gradle for Android and Java course from Udacity.

Score: 0

In my case, the installRelease option didn't show up until 1 I deleted the line

if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {

More Related questions