我最近更新Android Studio從0.6到0.8.6,似乎能夠指定默認的「運行」配置已被刪除(或移動到我需要的位置幫助找到)。我可以在調試模式或發佈模式下生成簽名的APK(生成嚮導已更改爲允許我在此處選擇生成變體),但似乎無法找到如何爲一般選擇生成變體使用。換句話說,當我點擊「運行」時,當我需要運行assembleDebug
時,gradle會執行assembleRelease
。任何想法如何改變這一點?Android Studio 0.8.6更改默認生成變體
編輯:當我選擇的,而不是「運行」 gradle這個仍然選擇運行assembleRelease
「調試」,所以我得到這個錯誤
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.
然而,如果我的debuggable="true"
屬性添加到我的清單中,構建失敗。我的build.gradle是否正確?
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.+'
}
是你正在尋找的[build options menu](http://prntscr.com/4i1h6j)嗎? – Zyerah 2014-08-30 18:24:18
不,我沒有看到任何選項來更改該菜單中的構建變體。 – cjbrooks12 2014-08-30 18:25:31