How to create a test apk from an Android file Android?

Android Gradle documentation says the following:

The library project can also generate a test apk to test the library independently of the application.

But I can't find a way to do it. Targets assembleDebug

/ assembleRelease

don't seem to generate an APK.

How do I get an APK from a (offline) library?

+3


source to share


1 answer


You can add assembDebugTest build task to generate apk test from library project. This apk test can be used to test the library as it contains both test code and library code.



+1


source







All Articles