Gunanaresh
Gunanaresh

Reputation: 979

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

The Android Gradle documentation says this:

A library project can also generate a test apk to test the library independently from an application.

But I don't find a way to do that. The assembleDebug/assembleRelease targets don't seem to generate any APK.

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

Upvotes: 4

Views: 1840

Answers (1)

Ashish Singh
Ashish Singh

Reputation: 11

You can add assembleDebugTest build task for generating test apk from library project. This test apk can be used to test the library as it contains both the test code along with the library code.

Upvotes: 1

Related Questions