Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio : install Release App by command line

I want to export apk file "release apk" from command line when I run this command : gradlew installRelease

and I found this

Android Studio Task 'install Release' not found in root project ''. Some candidates are: 'uninstall Release'.

How can I solve it?

like image 251
Muhamet Aljobairi Avatar asked May 22 '14 11:05

Muhamet Aljobairi


Video Answer


2 Answers

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

like image 69
Bob Snyder Avatar answered Oct 16 '22 20:10

Bob Snyder


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

like image 27
eleven Avatar answered Oct 16 '22 19:10

eleven