I recently updated Android Studio from 0.6 to 0.8.6, and it seems the ability to specify the default "run" configuration has been removed (or else moved to a location that I need help finding). I am able to to generate a signed APK in either debug or release mode (the generate wizard has been changed to allow me to select the build variant at this point) but can't seem to find out how to select a build variant for general use. In other words, when I click "run" gradle executes assembleRelease
when I need to to run assembleDebug
. Any idea of how to change this?
EDIT: When I select "debug" instead of "run" gradle still chooses to run assembleRelease
, so I get this error
Cannot debug application com.caseybrooks.scripturememory on device lge-vs985_4g-VS9854Gc824b3f1.
This application does not have the debuggable attribute enabled in its manifest.
If you have manually set it in the manifest, then remove it and let the IDE automatically assign it.
If you are using Gradle, make sure that your current variant is debuggable.
Yet if I add the debuggable="true"
attribute to my manifest, the build fails. Is my build.gradle correct?
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
}
signingConfigs {
release {
storeFile file('C:/Users/Casey/Documents/android/scripturememory/scripturememory_keystore')
keyAlias 'scripturememory_keystore'
storePassword '***********'
keyPassword '**********'
}
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
}
}
productFlavors {
}
sourceSets {
main {
java.srcDirs = ['src/main/java']
}
}
}
dependencies {
compile project(':library')
compile project(':AndroidBibleTools')
compile 'com.android.support:appcompat-v7:19.+'
}
The View menu > Tool Windows > Build Variants view lets you choose which flavor/build type is built by default for the modules in your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With