12

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?

Pankaj
  • 7,908
  • 6
  • 42
  • 65
Lê Khánh Vinh
  • 2,591
  • 5
  • 31
  • 77

4 Answers4

9

There is a tab, which is normally at the bottom left corner of AS. Change it from *release to *debug.

Build variant tab

(Image source : Matt W Ott, Android TDD with Robolectric and JUnit)

Adeeb
  • 1,271
  • 3
  • 16
  • 33
  • 1
    I 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
  • can i see your build.gradle file, the `signingConfigs` part. – Adeeb Nov 24 '15 at 09:48
  • 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
  • perfect answere some whow – Pir Fahim Shah Nov 23 '17 at 12:07
2

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.

zundi
  • 2,361
  • 1
  • 28
  • 45
0

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

Ishaan Kumar
  • 968
  • 1
  • 11
  • 24
0

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"

Dabhi
  • 1
  • 1