diff --git a/tests/Android.mk b/tests/Android.mk
index cc576112911c541a03ea4e2230a54e531382b131..b290a518afa8de5b19ba3f6696fe2fa2e81cd1a8 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -26,8 +26,9 @@ LOCAL_AAPT_FLAGS += -0 .txt
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
     android-support-test \
-    mockito-target \
-    legacy-android-test
+    mockito-target
+
+LOCAL_JAVA_LIBRARIES := android.test.mock.sdk legacy-android-test
 
 # Include all test java files.
 LOCAL_SRC_FILES := $(call all-java-files-under, src)