Android Studio Permanently Change Debug Configuration for Working Directory $MODULE_DIR$ and app:assembleDebugUnitTest

By | October 25, 2015

On Mac OS X, Android Studio’s default debug Unit Test build configuration generally doesn’t run with default settings complaining that:

AndroidManifest.xml not found or not a file; it should point to your project’s AndroidManifest.xml

To fix this error you need to edit your debug configuration to set Working Directory as $MODULE_DIR$ and it makes builds faster to set Before Launch as gradle :app:assembleDebugUnitTest

To set these Debug build configuration settings permanently go to Android Studio Menu -> Run -> Edit Configurations… -> click on the little wrench and cog icon to Edit Defaults, JUnit should be selected if you’re currently on a Unit Test and change the working Directory to $MODULE_DIR$ and Before Launch: Gradle-aware Make and choosing :app:assembleDebugUnitTest. Remove the plain-jane “Make” from the list as well.

android-studio-menu-edit-configurations
android-studio-debug-edit-configuration-screen


Related Articles: