Hi I tried generated signed apk 1 times for testing and now i only want to stimulate on tested devices but android studio always generated signed apk. That will make the process longer (every time I hit run button android studio will generated signed apk automatically) how to disable auto generated signed apk? i just want to run app on simulator only?
-
change the build variant from *release to *debug – Adeeb Nov 24 '15 at 07:45
-
Thanks How to change the build variant? – Lê Khánh Vinh Nov 24 '15 at 07:52
4 Answers
There is a tab, which is normally at the bottom left corner of AS. Change it from *release to *debug.
(Image source : Matt W Ott, Android TDD with Robolectric and JUnit)

- 1,271
- 3
- 16
- 33
-
1I have checked according to the image. Change to debug already but still auto generate signed apk. Dont know why – Lê Khánh Vinh Nov 24 '15 at 08:49
-
-
My build.gradle// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() flatDir { dirs 'libs' } } } task clean(type: Delete) { delete rootProject.buildDir } – Lê Khánh Vinh Nov 24 '15 at 09:53
-
Not the top-level build file, i am interested in the second one : the one specific to your app module. – Adeeb Nov 24 '15 at 09:57
-
Android Studio seems to always do the last build type you did.
So just select Build -> Build APK, and next time it will do this instead of Generate Signed APK.

- 2,361
- 1
- 28
- 45
When running or debugging your project from the IDE, Android Studio automatically signs your APK with a debug certificate generated by the Android SDK tools. The first time you run or debug your project in Android Studio, the IDE automatically creates the debug keystore and certificate in $HOME/.android/debug.keystore, and sets the keystore and key passwords.
If the build variant is RELEASE, you have to provide the signing config but the apk must be signed becuase:
Android requires that all APKs be digitally signed with a certificate before they can be installed.
Source: Sign Your App

- 968
- 1
- 11
- 24
try to this way opens
build.gradle(Module:app)
Then go to
buildTypes {}
and Remove (Delete)
debug {signingConfig signingConfigs.config}
then Sync Now and run "app"

- 1
- 1