artem-zinnatullin / qualitymatters

Android Development Culture

Home Page:https://artemzin.com/blog/android-development-culture-the-document-qualitymatters/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release not recognized as a valid source set

Plastix opened this issue · comments

For some reason the release code and release unit tests are not recognized by my version of Android studio (2.0-Beta7).

screen shot 2016-03-19 at 12 55 35 pm

This makes it impossible to run the release unit tests. I've noticed that the release build type in the gradle config is missing an id. However adding this back in doesn't solve the problem. Any ideas?

buildTypes { 
    ...
    release {
            signingConfig signingConfigs.qualityMatters
            applicationIdSuffix '.release' // Missing from build.gradle!!
            ...
    }

Apparently you have to switch the build variant in Android studio. It is very strange that Android studio can't view more than one build variant at a time.

Yes, in Android Studio you can work only with only one combination of build type and product flavor (qualitymatters doesn't have flavors).

I guess, the main reason why Android Studio has this limitation — because classes from different build types and product flavors may have same fully qualified name, and btw, qualitymatters does have such classes: release/../DeveloperSettingsModule.java and debug/../DeveloperSettingsModule.java

Thank you for the clarification @artem-zinnatullin!