{"id":463,"date":"2015-09-13T00:02:28","date_gmt":"2015-09-13T00:02:28","guid":{"rendered":"http:\/\/installingcats.com\/?p=463"},"modified":"2015-09-13T00:02:28","modified_gmt":"2015-09-13T00:02:28","slug":"android-studio-androidtest-sourcesets-gradle-recognized","status":"publish","type":"post","link":"https:\/\/installingcats.com\/2015\/09\/13\/android-studio-androidtest-sourcesets-gradle-recognized\/","title":{"rendered":"Android Studio androidTest sourceSets gradle not recognized"},"content":{"rendered":"

Android Studio (app) build.gradle\u00a0sourceSets androidTest java.srcDir property may not be recognized when using the array format of this source directory property setting.<\/p>\n

BAD<\/h2>\n
sourceSets {\n    androidTest {\n        java.srcDirs = ['androidTest\/java']\n    }\n}<\/pre>\n

GOOD<\/h2>\n
sourceSets {\n    androidTest {\n        java.srcDir file('androidTest\/java')\n    }\n}\n<\/pre>\n

For setting up Robotium UI \/ Integration testing, it’s\u00a0important that your androidTest source directory is recognized.<\/p>\n","protected":false},"excerpt":{"rendered":"

Android Studio (app) build.gradle\u00a0sourceSets androidTest java.srcDir property may not be recognized when using the array format of this source directory property setting. BAD sourceSets { androidTest { java.srcDirs = [‘androidTest\/java’] } } GOOD sourceSets { androidTest { java.srcDir file(‘androidTest\/java’) } } For setting up Robotium UI \/ Integration testing, it’s\u00a0important that your androidTest source directory […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,29],"tags":[239],"_links":{"self":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/463"}],"collection":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/comments?post=463"}],"version-history":[{"count":0,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/463\/revisions"}],"wp:attachment":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/media?parent=463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/categories?post=463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/tags?post=463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}