AFAIK IntelliJ allows to exclude packages. Open Project Structure (Ctr+Alt+Shift+S in Linux) > Modules > Sources Tab.
However if you would like to exclude only one class use Gradle build file.
Android Studio uses Gradle so in build.gradle file add inside android configuration custom SourceSet that excludes your class e.g:
android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 19
targetSdkVersion 19
packageName "org.homelab.lab"
testPackageName "org.homelab.lab.test"
}
sourceSets {
main {
java {
exclude '**/SomeExcludedClass.java'
}
}
androidTest {
java {
exclude '**/TestSomeExcludedClass.java'
}
}
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…