I recently updated Android Studio to version 0.3.0 and now there are no build variants I can choose from. I have tried cleaning and rebuilding the project, and restarting Android Studio with no success. My build.gradle is
android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
defaultConfig {
minSdkVersion 9
targetSdkVersion 18
versionCode 10
}
productFlavors {
lite {
packageName "com.lvl.xpbar"
versionCode 11
}
pro {
packageName "com.afewguys.raisethebar"
versionCode 1
}
}
sourceSets {
main {
manifest.srcFile '/src/main/AndroidManifest.xml'
java.srcDirs = ['/src/main/java','.apt_generated']
resources.srcDirs = ['/src/main/java','.apt_generated']
aidl.srcDirs = ['/src/main/java','.apt_generated']
renderscript.srcDirs = ['/src/main/java','.apt_generated']
res.srcDirs = ['/src/main/res']
assets.srcDirs = ['assets']
}
lite {
manifest.srcFile 'src/main/AndroidManifest.xml'
}
pro {
manifest.srcFile 'src/main/AndroidManifest.xml'
}
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
Any help is greatly appreciated
You need to sync project with Gradle files:
In latest version of Android Studio: File -> Sync Project with Gradle Files.
In previous versions: Tools -> Android -> Sync Project with Gradle Files
In your /gradle/gradle-wrapper.properties file update the following setting to:
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip
Now, go to Tools -> Android -> Sync Project with Gradle Files
This will download the latest distribution of Gradle and automatically reload your project and build variants after it's finished.
Make sure to update your project's build.gradle files to
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
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