On Sun, Jul 26, 2015 at 4:52 AM, Sheng-Dean <littledot5...@gmail.com> wrote:
> 've thought of creating a new module that only contains test resources. > However, this idea won't fly because the Android Gradle plugin refuses to > depend on an app module. > > project testCommon resolves to an APK archive which is not supported > as a compilation dependency. > > Is that common module set up as an Android Library? > Is there any other way to create test classes that could be reused in both > Android Tests and Unit Tests? > What you're doing should theoretically work with a library. This project may be of interest for you: https://github.com/googlesamples/android-testing-templates Personally I've abandoned /test and just do everything in /androidTest - makes it a whole lot easier to deal with stuff like this and, in particular, removes the annoyance of switching the Test Artifact back and forth in Android Studio. ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.