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?
My experience has been that the
installRelease
task does not become available until you define thesigningConfigs
in thebuildTypes.release
block of your build file, as shown in step 3 of Signing in Release Mode. WithoutsigningConfigs
, you will get other release tasks, such asassembleRelease
, but notinstallRelease
.So there is no such task. You can see all available tasks calling
gradlew tasks
. To assemble release version ofapk
callgradlew assembleRelease
and then usingadb
install it.You may build with Android Studio
Build/Generate Signed APK...
. In this case you'll get.apk
file in your repository. You then can useadb install .apk
to install it. You'll have no changes inbuild.gradle
file in this case.Alternatively you may change
build.gradle
file as mentioned here. In this case you will haveinstallRelease
task. You may get these changes inbuild.gradle
usingOpen Module Settings
menu. See details inGradle for Android and Java
course from Udacity.